Test cleanup and fixes [u-v]

This commit is contained in:
Angelos Chalaris
2018-06-18 18:52:13 +03:00
parent 46ad6c08b9
commit c0a42d906a
16 changed files with 135 additions and 157 deletions

View File

@ -1,12 +1,9 @@
const expect = require('expect');
const unionWith = require('./unionWith.js');
test('unionWith is a Function', () => {
test('unionWith is a Function', () => {
expect(unionWith).toBeInstanceOf(Function);
});
test('Produces the appropriate results', () => {
expect(unionWith([1, 1.2, 1.5, 3, 0], [1.9, 3, 0, 3.9], (a, b) => Math.round(a) === Math.round(b)), [1, 1.2, 1.5, 3, 0, 3.9]).toEqual()
test('Produces the appropriate results', () => {
expect(unionWith([1, 1.2, 1.5, 3, 0], [1.9, 3, 0, 3.9], (a, b) => Math.round(a) === Math.round(b))).toEqual([1, 1.2, 1.5, 3, 0, 3.9]);
});