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

+1-4
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)