Files
30-seconds-of-code/test/pull.test.js
2018-10-19 20:18:00 +03:00

12 lines
309 B
JavaScript

const expect = require('expect');
const {pull} = require('./_30s.js');
test('pull is a Function', () => {
expect(pull).toBeInstanceOf(Function);
});
let myArray = ['a', 'b', 'c', 'a', 'b', 'c'];
pull(myArray, 'a', 'c');
test('Pulls the specified values', () => {
expect(myArray).toEqual(['b', 'b']);
});