Refactor Maths/Factorial for more minimal side effects.

This commit is contained in:
Yosapol Jitrak
2020-10-16 16:31:40 +07:00
parent 90891b5657
commit e0883facdb
2 changed files with 10 additions and 25 deletions

View File

@@ -1,9 +1,6 @@
import { calcFactorial } from '../Factorial'
describe('calcFactorial', () => {
it('is a function', () => {
expect(typeof calcFactorial).toEqual('function')
})
it('should return a statement for value "0"', () => {
expect(calcFactorial(0)).toBe('The factorial of 0 is 1.')