mirror of
https://github.com/hanzoai/core-js.git
synced 2026-09-24 16:58:15 +00:00
14 lines
511 B
JavaScript
14 lines
511 B
JavaScript
import isExtensible from 'core-js-pure/es/object/is-extensible';
|
|
|
|
QUnit.test('Object.isExtensible', assert => {
|
|
assert.isFunction(isExtensible);
|
|
assert.arity(isExtensible, 1);
|
|
assert.name(isExtensible, 'isExtensible');
|
|
const primitives = [42, 'string', false, null, undefined];
|
|
for (const value of primitives) {
|
|
assert.notThrows(() => isExtensible(value) || true, `accept ${ value }`);
|
|
assert.false(isExtensible(value), `returns false on ${ value }`);
|
|
}
|
|
assert.true(isExtensible({}));
|
|
});
|