Added test cases for 0 and string 0

This commit is contained in:
Miko 2023-09-18 23:06:29 +02:00 committed by GitHub
parent f2c0d0955b
commit 5ac1931f72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -16,9 +16,15 @@ describe('fibonacci', () => {
test.skip('25th fibonacci number is 75025', () => { test.skip('25th fibonacci number is 75025', () => {
expect(fibonacci(25)).toBe(75025); expect(fibonacci(25)).toBe(75025);
}); });
test('0th fibonacci number is o', () => {
expect(fibonacci(0)).toBe(0);
});
test.skip('doesn\'t accept negatives', () => { test.skip('doesn\'t accept negatives', () => {
expect(fibonacci(-25)).toBe("OOPS"); expect(fibonacci(-25)).toBe("OOPS");
}); });
test.skip('DOES accept strings', () => {
expect(fibonacci("0")).toBe(0);
});
test.skip('DOES accept strings', () => { test.skip('DOES accept strings', () => {
expect(fibonacci("1")).toBe(1); expect(fibonacci("1")).toBe(1);
}); });