Test cleanup and fixes [c-d]
This commit is contained in:
@ -5,6 +5,10 @@ const indexOfAll = require('./indexOfAll.js');
|
||||
test('indexOfAll is a Function', () => {
|
||||
expect(indexOfAll).toBeInstanceOf(Function);
|
||||
});
|
||||
t.deepEqual(indexOfAll([1, 2, 3, 1, 2, 3], 1), [0,3], "Returns all indices of val in an array");
|
||||
t.deepEqual(indexOfAll([1, 2, 3], 4), [], "Returns all indices of val in an array");
|
||||
test('Returns all indices of val in an array', () => {
|
||||
expect(indexOfAll([1, 2, 3, 1, 2, 3], 1), [0).toEqual(3])
|
||||
});
|
||||
test('Returns all indices of val in an array', () => {
|
||||
expect(indexOfAll([1, 2, 3], 4)).toEqual([])
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user