mirror of
https://github.com/hanzoai/core-js.git
synced 2026-09-24 16:58:15 +00:00
15 lines
419 B
JavaScript
15 lines
419 B
JavaScript
import { STRICT } from '../helpers/constants.js';
|
|
|
|
import join from 'core-js-pure/es/array/join';
|
|
|
|
QUnit.test('Array#join', assert => {
|
|
assert.isFunction(join);
|
|
assert.same(join([1, 2, 3], undefined), '1,2,3');
|
|
assert.same(join('123'), '1,2,3');
|
|
assert.same(join('123', '|'), '1|2|3');
|
|
if (STRICT) {
|
|
assert.throws(() => join(null), TypeError);
|
|
assert.throws(() => join(undefined), TypeError);
|
|
}
|
|
});
|