Test cleanup and fixes [o-p]

This commit is contained in:
Angelos Chalaris
2018-06-18 18:00:19 +03:00
parent 9f95330528
commit 072728dad2
35 changed files with 164 additions and 262 deletions

View File

@ -1,17 +1,14 @@
const expect = require('expect');
const pullAtValue = require('./pullAtValue.js');
test('pullAtValue is a Function', () => {
test('pullAtValue is a Function', () => {
expect(pullAtValue).toBeInstanceOf(Function);
});
let myArray = ['a', 'b', 'c', 'd'];
let pulled = pullAtValue(myArray, ['b', 'd']);
test('Pulls the specified values', () => {
expect(myArray, [ 'a', 'c' ]).toEqual()
let myArray = ['a', 'b', 'c', 'd'];
let pulled = pullAtValue(myArray, ['b', 'd']);
test('Pulls the specified values', () => {
expect(myArray).toEqual([ 'a', 'c' ]);
});
test('Pulls the specified values', () => {
expect(pulled, [ 'b', 'd' ]).toEqual()
expect(pulled).toEqual([ 'b', 'd' ]);
});