Test files linted

This commit is contained in:
Angelos Chalaris
2018-08-03 10:39:26 +03:00
parent 5ef1fab5fd
commit cc7b76d0b3
153 changed files with 754 additions and 463 deletions

View File

@ -4,17 +4,11 @@ const reject = require('./reject.js');
test('reject is a Function', () => {
expect(reject).toBeInstanceOf(Function);
});
const noEvens = reject(
(x) => x % 2 === 0,
[1, 2, 3, 4, 5]
);
const noEvens = reject(x => x % 2 === 0, [1, 2, 3, 4, 5]);
test('Works with numbers', () => {
expect(noEvens).toEqual([1, 3, 5]);
});
const fourLettersOrLess = reject(
(word) => word.length > 4,
['Apple', 'Pear', 'Kiwi', 'Banana']
);
const fourLettersOrLess = reject(word => word.length > 4, ['Apple', 'Pear', 'Kiwi', 'Banana']);
test('Works with strings', () => {
expect(fourLettersOrLess).toEqual(['Pear', 'Kiwi']);
});