mirror of
https://github.com/hanzoai/core-js.git
synced 2026-09-24 16:58:15 +00:00
20 lines
658 B
JavaScript
20 lines
658 B
JavaScript
QUnit.test('Set#join', assert => {
|
|
const { join } = Set.prototype;
|
|
|
|
assert.isFunction(join);
|
|
assert.arity(join, 1);
|
|
assert.name(join, 'join');
|
|
assert.looksNative(join);
|
|
assert.nonEnumerable(Set.prototype, 'join');
|
|
|
|
assert.same(new Set([1, 2, 3]).join(), '1,2,3');
|
|
assert.same(new Set([1, 2, 3]).join(undefined), '1,2,3');
|
|
assert.same(new Set([1, 2, 3]).join('|'), '1|2|3');
|
|
|
|
assert.throws(() => join.call(new Map()), TypeError);
|
|
assert.throws(() => join.call({}), TypeError);
|
|
assert.throws(() => join.call([]), TypeError);
|
|
assert.throws(() => join.call(undefined), TypeError);
|
|
assert.throws(() => join.call(null), TypeError);
|
|
});
|