mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2026-03-13 15:21:15 +08:00
merge: Added LucasSeries Implementation (#808)
* Added LucasSeries * Added more tests and renamed function * Changed RangeError to TypeError
This commit is contained in:
15
Maths/test/LucasSeries.test.js
Normal file
15
Maths/test/LucasSeries.test.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import { lucas } from '../LucasSeries'
|
||||
|
||||
describe('Nth Lucas Number', () => {
|
||||
it('should return the 20th Lucas Number', () => {
|
||||
expect(lucas(20)).toBe(15127)
|
||||
})
|
||||
|
||||
it('should return the 20th Lucas Number', () => {
|
||||
expect(lucas(0)).toBe(2)
|
||||
})
|
||||
|
||||
it('should return the 20th Lucas Number', () => {
|
||||
expect(lucas(100)).toBe(792070839848372100000)
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user