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