mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-07 11:08:54 +08:00
merge: Add test case (#851)
* Add test case * minor fix * delete files * rename file
This commit is contained in:
11
Recursive/test/Factorial.test.js
Normal file
11
Recursive/test/Factorial.test.js
Normal file
@ -0,0 +1,11 @@
|
||||
import { factorial } from '../Factorial'
|
||||
|
||||
describe('Factorial', () => {
|
||||
it('should return factorial 1 for value "0"', () => {
|
||||
expect(factorial(0)).toBe(1)
|
||||
})
|
||||
|
||||
it('should return factorial 120 for value "5"', () => {
|
||||
expect(factorial(5)).toBe(120)
|
||||
})
|
||||
})
|
Reference in New Issue
Block a user