Skip to content

Commit f80471d

Browse files
authored
Merge pull request TheOdinProject#605 from camille-lanuel/factorial_test_bug_fix
computer_science/recursion/1_factorial: fixed bug where test could fail for 25! despite correct implementation
2 parents 37da0ed + a46c8a5 commit f80471d

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

computer_science/recursion/1_factorial/factorial.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ describe('factorial', () => {
1313
test.skip('15th factorial number is 1307674368000', () => {
1414
expect(factorial(15)).toBe(1307674368000);
1515
});
16-
test.skip('25th factorial number is 1.5511210043330986e+25', () => {
17-
expect(factorial(25)).toBe(1.5511210043330986e+25);
16+
test.skip('18th factorial number is 6.402373705728e+15', () => {
17+
expect(factorial(18)).toBe(6.402373705728e15)
1818
});
1919
test.skip('0th factorial number is 1', () => {
2020
expect(factorial(0)).toBe(1);

computer_science/recursion/1_factorial/solution/factorial-solution.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ describe('factorial', () => {
1313
test('15th factorial number is 1307674368000', () => {
1414
expect(factorial(15)).toBe(1307674368000);
1515
});
16-
test('25th factorial number is 1.5511210043330986e+25', () => {
17-
expect(factorial(25)).toBe(1.5511210043330986e+25);
16+
test('18th factorial number is 6.402373705728e+15', () => {
17+
expect(factorial(18)).toBe(6.402373705728e15)
1818
});
1919
test('0th factorial number is 1', () => {
2020
expect(factorial(0)).toBe(1);

0 commit comments

Comments
 (0)