mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 17:37:50 +00:00
wip: migrate to bun
This commit is contained in:
20
test/join.spec.ts
Normal file
20
test/join.spec.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import assert from 'node:assert';
|
||||
import join from '../src/join';
|
||||
|
||||
describe('join', () => {
|
||||
const array = ['a', 'b', 'c'];
|
||||
|
||||
it('should return join all array elements into a string', () => {
|
||||
assert.strictEqual(join(array, '~'), 'a~b~c');
|
||||
});
|
||||
|
||||
it('should return an unwrapped value when implicitly chaining', () => {
|
||||
const wrapped = _(array);
|
||||
assert.strictEqual(wrapped.join('~'), 'a~b~c');
|
||||
assert.strictEqual(wrapped.value(), array);
|
||||
});
|
||||
|
||||
it('should return a wrapped value when explicitly chaining', () => {
|
||||
assert.ok(_(array).chain().join('~') instanceof _);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user