wip: migrate to bun

This commit is contained in:
jdalton
2023-09-16 14:47:50 -07:00
parent 2da024c3b4
commit 97d4a2fe19
1052 changed files with 30244 additions and 26856 deletions

23
test/without.spec.ts Normal file
View File

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