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