mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2026-03-13 15:21:15 +08:00
Added EulersTotientFunction function to the Maths Folder
This commit is contained in:
11
Maths/test/EulersTotientFunction.test.js
Normal file
11
Maths/test/EulersTotientFunction.test.js
Normal file
@@ -0,0 +1,11 @@
|
||||
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)
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user