mirror of
https://github.com/hanzoai/core-js.git
synced 2026-09-24 16:58:15 +00:00
15 lines
645 B
JavaScript
15 lines
645 B
JavaScript
import { DESCRIPTORS } from '../helpers/constants.js';
|
|
|
|
QUnit.test('Symbol.dispose', assert => {
|
|
assert.true('dispose' in Symbol, 'Symbol.dispose available');
|
|
assert.true(Object(Symbol.dispose) instanceof Symbol, 'Symbol.dispose is symbol');
|
|
// Node 20.4.0 add `Symbol.dispose`, but with incorrect descriptor
|
|
// https://github.com/nodejs/node/issues/48699
|
|
if (DESCRIPTORS) {
|
|
const descriptor = Object.getOwnPropertyDescriptor(Symbol, 'dispose');
|
|
assert.false(descriptor.enumerable, 'non-enumerable');
|
|
assert.false(descriptor.writable, 'non-writable');
|
|
assert.false(descriptor.configurable, 'non-configurable');
|
|
}
|
|
});
|