mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 00:57:48 +00:00
wip: code formatting nits continued
This commit is contained in:
19
test/join.spec.js
Normal file
19
test/join.spec.js
Normal file
@@ -0,0 +1,19 @@
|
||||
import join from '../src/join';
|
||||
|
||||
describe('join', () => {
|
||||
const array = ['a', 'b', 'c'];
|
||||
|
||||
it('should return join all array elements into a string', () => {
|
||||
expect(join(array, '~')).toBe('a~b~c');
|
||||
});
|
||||
|
||||
it('should return an unwrapped value when implicitly chaining', () => {
|
||||
const wrapped = _(array);
|
||||
expect(wrapped.join('~')).toBe('a~b~c');
|
||||
expect(wrapped.value()).toBe(array);
|
||||
});
|
||||
|
||||
it('should return a wrapped value when explicitly chaining', () => {
|
||||
expect(_(array).chain().join('~') instanceof _);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user