mirror of
https://github.moeyy.xyz/https://github.com/trekhleb/javascript-algorithms.git
synced 2024-11-10 11:09:43 +08:00
Add test for factorialRecursiveTCO
This commit is contained in:
parent
4ea1ad0bb8
commit
9787af0267
@ -0,0 +1,11 @@
|
|||||||
|
import factorialRecursiveTCO from '../factorialRecursiveTCO';
|
||||||
|
|
||||||
|
describe('factorialRecursiveTCO', () => {
|
||||||
|
it('should calculate factorial', () => {
|
||||||
|
expect(factorialRecursiveTCO(0)).toBe(1);
|
||||||
|
expect(factorialRecursiveTCO(1)).toBe(1);
|
||||||
|
expect(factorialRecursiveTCO(5)).toBe(120);
|
||||||
|
expect(factorialRecursiveTCO(8)).toBe(40320);
|
||||||
|
expect(factorialRecursiveTCO(10)).toBe(3628800);
|
||||||
|
});
|
||||||
|
});
|
Loading…
Reference in New Issue
Block a user