mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-05 16:26:47 +08:00
merge: Add test cases (#854)
This commit is contained in:
19
Recursive/test/FibonacciNumberRecursive.test.js
Normal file
19
Recursive/test/FibonacciNumberRecursive.test.js
Normal file
@ -0,0 +1,19 @@
|
||||
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)
|
||||
})
|
||||
})
|
Reference in New Issue
Block a user