mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-04 07:29:47 +08:00

* Added LucasSeries * Added more tests and renamed function * Changed RangeError to TypeError
16 lines
367 B
JavaScript
16 lines
367 B
JavaScript
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)
|
|
})
|
|
})
|