merge: Added LucasSeries Implementation (#808)

* Added LucasSeries

* Added more tests and renamed function

* Changed RangeError to TypeError
This commit is contained in:
Dumby
2021-10-25 10:03:02 +05:30
committed by GitHub
parent e8d862ca94
commit 69a397cc33
2 changed files with 48 additions and 0 deletions

View 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)
})
})