Test cleanup and fixes [m-n]

This commit is contained in:
Angelos Chalaris
2018-06-18 17:40:29 +03:00
parent 82f0d6bc52
commit b393ad5878
20 changed files with 102 additions and 153 deletions

View File

@ -1,12 +1,9 @@
const expect = require('expect');
const negate = require('./negate.js');
test('negate is a Function', () => {
test('negate is a Function', () => {
expect(negate).toBeInstanceOf(Function);
});
test('Negates a predicate function', () => {
expect([1, 2, 3, 4, 5, 6].filter(negate(n => n % 2 === 0)), [1, 3).toEqual(5])
test('Negates a predicate function', () => {
expect([1, 2, 3, 4, 5, 6].filter(negate(n => n % 2 === 0))).toEqual([1, 3, 5]);
});