mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2026-03-13 15:21:15 +08:00
merge: Added Aliquot Sum Implementation (#810)
* Added LucasSeries * Added more tests and renamed function * Changed RangeError to TypeError * Added Aliquot Sum and tests * Fix ALiquot tests, need to learn how to use Jest * Added some explanation for the Aliquot sum
This commit is contained in:
15
Maths/test/AliquotSum.test.js
Normal file
15
Maths/test/AliquotSum.test.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import { aliquotSum } from '../AliquotSum'
|
||||
|
||||
describe('Aliquot Sum of a Number', () => {
|
||||
it('Aliquot Sum of 6', () => {
|
||||
expect(aliquotSum(6)).toBe(6)
|
||||
})
|
||||
|
||||
it('Aliquot Sum of 1', () => {
|
||||
expect(aliquotSum(1)).toBe(0)
|
||||
})
|
||||
|
||||
it('Aliquot Sum of 28', () => {
|
||||
expect(aliquotSum(28)).toBe(28)
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user