Test cleanup and fixes [a-b]

This commit is contained in:
Angelos Chalaris
2018-06-18 15:54:48 +03:00
parent a78f5db260
commit 026c65a5e6
151 changed files with 753 additions and 373 deletions

View File

@ -5,8 +5,14 @@ const drop = require('./drop.js');
test('drop is a Function', () => {
expect(drop).toBeInstanceOf(Function);
});
t.deepEqual(drop([1, 2, 3]), [2,3], 'Works without the last argument');
t.deepEqual(drop([1, 2, 3], 2), [3], 'Removes appropriate element count as specified');
t.deepEqual(drop([1, 2, 3], 42), [], 'Empties array given a count greater than length');
test('Works without the last argument', () => {
expect(drop([1, 2, 3]), [2,3]).toEqual()
});
test('Removes appropriate element count as specified', () => {
expect(drop([1, 2, 3], 2), [3]).toEqual()
});
test('Empties array given a count greater than length', () => {
expect(drop([1, 2, 3], 42), []).toEqual()
});