mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-04 07:29:47 +08:00
12 lines
350 B
JavaScript
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)
|
|
})
|
|
})
|