mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-05 00:01:37 +08:00
20 lines
389 B
JavaScript
20 lines
389 B
JavaScript
import { fibonacci } from '../FibonacciNumberRecursive'
|
|
|
|
describe('FibonacciNumberRecursive', () => {
|
|
it('should return 0', () => {
|
|
expect(fibonacci(0)).toBe(0)
|
|
})
|
|
|
|
it('should return 1', () => {
|
|
expect(fibonacci(1)).toBe(1)
|
|
})
|
|
|
|
it('should return 5', () => {
|
|
expect(fibonacci(5)).toBe(5)
|
|
})
|
|
|
|
it('should return 9', () => {
|
|
expect(fibonacci(9)).toBe(34)
|
|
})
|
|
})
|