8000 Merge pull request #8 from Dareon4/master · CalWal/javascript-exercises@1e40135 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1e40135

Browse files
authored
Merge pull request TheOdinProject#8 from Dareon4/master
zero factorial is 1
2 parents 9f4c1ca + 5c78dc7 commit 1e40135

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

calculator/calculator.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ describe('power', function() {
5656

5757
describe('factorial', function() {
5858
it('computes the factorial of 0', function() {
59-
expect(calculator.factorial(0)).toEqual(0);
59+
expect(calculator.factorial(0)).toEqual(1); // 0! = 1
6060
});
6161

6262
it('computes the factorial of 1', function() {
@@ -74,4 +74,4 @@ describe('factorial', function() {
7474
it('computes the factorial of 10', function() {
7575
expect(calculator.factorial(10)).toEqual(3628800);
7676
});
77-
});
77+
});

0 commit comments

Comments
 (0)
0