mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-20 02:23:24 +08:00
12 lines
268 B
JavaScript
12 lines
268 B
JavaScript
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)
|
|
})
|
|
})
|