Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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
Lines changed: 15 additions & 0 deletions
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)

AltStyle によって変換されたページ (->オリジナル) /