Files
30-seconds-of-code/test/indexOfAll/indexOfAll.test.js
Angelos Chalaris 4f7da1be9b Test migration to jest by hand
Apparently using regular expressions is way easier.
2018-06-18 15:15:56 +03:00

11 lines
366 B
JavaScript

const expect = require('expect');
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");