Add archive snippet tests

This commit is contained in:
Angelos Chalaris
2018-10-26 21:15:14 +03:00
parent 4db17737b8
commit 6090836233
4 changed files with 21 additions and 0 deletions

View File

@ -4,3 +4,6 @@ const {fibonacciUntilNum} = require('./_30s.js');
test('fibonacciUntilNum is a Function', () => {
expect(fibonacciUntilNum).toBeInstanceOf(Function);
});
test('Returns the correct sequence', () => {
expect(fibonacciUntilNum(10)).toEqual([0, 1, 1, 2, 3, 5, 8]);
});