odin-default-js-exercises/fibonacci/fibonacci.spec.js

32 lines
838 B
JavaScript
Raw Normal View History

const expect = require('expect');const fibonacci = require('./fibonacci')
2017-08-25 19:29:48 +00:00
describe('fibonacci', function() {
it('works', function() {
expect(fibonacci(4)).toEqual(3);
});
xit('works', function() {
expect(fibonacci(6)).toEqual(8);
});
xit('works', function() {
expect(fibonacci(10)).toEqual(55);
});
xit('works', function() {
expect(fibonacci(15)).toEqual(610);
});
xit('works', function() {
expect(fibonacci(25)).toEqual(75025);
});
xit('doesn\'t accept negatives', function() {
expect(fibonacci(-25)).toEqual("OOPS");
});
2019-05-24 00:23:24 +00:00
xit('DOES accept strings', function() {
expect(fibonacci("1")).toEqual(1);
});
xit('DOES accept strings', function() {
expect(fibonacci("2")).toEqual(1);
});
2017-08-25 19:29:48 +00:00
xit('DOES accept strings', function() {
expect(fibonacci("8")).toEqual(21);
});
});