Skip to content

Commit b7ef53c

Browse files
committed
fit: check for negative numbers
1 parent 53aa0b1 commit b7ef53c

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Recursive/test/Factorial.test.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ describe('Factorial', () => {
1414
expect(() => factorial(null)).toThrow('Not a Number')
1515
expect(() => factorial(undefined)).toThrow('Not a Number')
1616
expect(() => factorial(3.142)).toThrow('Not a Whole Number')
17-
})
18-
19-
it('should return undefined for values less than 1', () => {
20-
expect(factorial(-1)).toBe(undefined)
17+
expect(() => factorial(-1)).toThrow('Not a Positive Number')
2118
})
2219
})

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy