Commit 6446143f authored by Stefanie Hasler's avatar Stefanie Hasler

working

parent feb3ab62
import { expect } from 'chai'
import {expect} from 'chai'
function fibonacci(n: number): number {
if (n > 1) {
return n-1
return n - 1
}
return n
}
//0, 1, 1, 2, 3, 5, 8, 13, 21, 34,
describe('Fibonacci', () => {
const test = (input: number, output: number) => {
expect(fibonacci(input)).to.equal(output)
}
it('0 is 0', () => {
expect(fibonacci(0)).to.equal(0)
test(0, 0)
})
it('1 is 1', () => {
......@@ -23,4 +27,6 @@ describe('Fibonacci', () => {
it('3 is 2', () => {
expect(fibonacci(3)).to.equal(2)
})
})
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment