Files
JavaScript/Maths/test/EulersTotientFunction.test.js
2020-12-14 12:26:08 +05:30

12 lines
350 B
JavaScript

import { eulersTotientFunction } from '../EulersTotientFunction'
describe('eulersTotientFunction', () => {
it('is a function', () => {
expect(typeof eulersTotientFunction).toEqual('function')
})
it('should return the phi of a given number', () => {
const phiOfNumber = eulersTotientFunction(10)
expect(phiOfNumber).toBe(4)
})
})