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

View File

@@ -0,0 +1,27 @@
import assert from 'node:assert';
import lodashStable from 'lodash';
import { falsey, stubTrue } from './utils';
describe('lodash(...).push', () => {
it('should append elements to `array`', () => {
const array = [1],
wrapped = _(array).push(2, 3),
actual = wrapped.value();
assert.strictEqual(actual, array);
assert.deepEqual(actual, [1, 2, 3]);
});
it('should accept falsey arguments', () => {
const expected = lodashStable.map(falsey, stubTrue);
const actual = lodashStable.map(falsey, (value, index) => {
try {
const result = index ? _(value).push(1).value() : _().push(1).value();
return lodashStable.eq(result, value);
} catch (e) {}
});
assert.deepEqual(actual, expected);
});
});