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

32 lines
815 B
JavaScript
Raw Normal View History

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