wip: code formatting nits continued

This commit is contained in:
jdalton
2023-09-16 22:59:56 -07:00
parent 0b28b7f7b6
commit b5c59317ea
421 changed files with 7354 additions and 9005 deletions

22
test/without.spec.js Normal file
View File

@@ -0,0 +1,22 @@
import without from '../src/without';
describe('without', () => {
it('should return the difference of values', () => {
const actual = without([2, 1, 2, 3], 1, 2);
expect(actual).toEqual([3]);
});
it('should use strict equality to determine the values to reject', () => {
const object1 = { a: 1 };
const object2 = { b: 2 };
const array = [object1, object2];
expect(without(array, { a: 1 })).toEqual(array);
expect(without(array, object1)).toEqual([object2]);
});
it('should remove all occurrences of each value from an array', () => {
const array = [1, 2, 3, 1, 2, 3];
expect(without(array, 1, 2), [3).toEqual(3]);
});
});