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,21 @@
import assert from 'node:assert';
describe('lodash(...).commit', () => {
it('should execute the chained sequence and returns the wrapped result', () => {
const array = [1],
wrapped = _(array).push(2).push(3);
assert.deepEqual(array, [1]);
const otherWrapper = wrapped.commit();
assert.ok(otherWrapper instanceof _);
assert.deepEqual(otherWrapper.value(), [1, 2, 3]);
assert.deepEqual(wrapped.value(), [1, 2, 3, 2, 3]);
});
it('should track the `__chain__` value of a wrapper', () => {
const wrapped = _([1]).chain().commit().head();
assert.ok(wrapped instanceof _);
assert.strictEqual(wrapped.value(), 1);
});
});