Files
core-js/tests/unit-global/esnext.symbol.metadata-key.js

14 lines
598 B
JavaScript

import { DESCRIPTORS } from '../helpers/constants.js';
QUnit.test('Symbol.metadataKey', assert => {
assert.true('metadataKey' in Symbol, 'Symbol.metadataKey available');
assert.nonEnumerable(Symbol, 'metadataKey');
assert.true(Object(Symbol.metadataKey) instanceof Symbol, 'Symbol.metadataKey is symbol');
if (DESCRIPTORS) {
const descriptor = Object.getOwnPropertyDescriptor(Symbol, 'metadataKey');
assert.false(descriptor.enumerable, 'non-enumerable');
assert.false(descriptor.writable, 'non-writable');
assert.false(descriptor.configurable, 'non-configurable');
}
});