Skip to content

Commit 8b6edf9

Browse files
author
iamvalentin23
committed
Add factorial test
1 parent 7a889e2 commit 8b6edf9

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
const { factorial } = require('.');
2+
3+
describe('Factorial', () => {
4+
it('Should return 24', () => {
5+
expect(factorial(4)).toEqual(24);
6+
});
7+
8+
it('Should return 1', () => {
9+
expect(factorial(1)).toEqual(1);
10+
});
11+
12+
it('Should return 120', () => {
13+
expect(factorial(5)).toEqual(120);
14+
});
15+
});

0 commit comments

Comments
 (0)