Files
med-notes/.pnpm-store/v10/files/a0/5880fbdaeb7715f23115a276a408f31896b9deb3e17c6cb7423fc5cdf58e3cf683e68f21a89d1616a99ef3a5f71ec75b1e3c6fb8415771546e9b3d63738cfd
2025-06-26 04:42:51 +00:00

32 lines
935 B
Plaintext

'use strict';
var test = require('tape');
if (typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol') {
test('has native Symbol.toStringTag support', function (t) {
t.equal(typeof Symbol, 'function');
t.equal(typeof Symbol.toStringTag, 'symbol');
t.end();
});
// @ts-expect-error CJS has top-level return
return;
}
var hasSymbolToStringTag = require('../../shams');
test('polyfilled Symbols', function (t) {
/* eslint-disable global-require */
t.equal(hasSymbolToStringTag(), false, 'hasSymbolToStringTag is false before polyfilling');
// @ts-expect-error no types defined
require('core-js/fn/symbol');
// @ts-expect-error no types defined
require('core-js/fn/symbol/to-string-tag');
require('../tests')(t);
var hasToStringTagAfter = hasSymbolToStringTag();
t.equal(hasToStringTagAfter, true, 'hasSymbolToStringTag is true after polyfilling');
/* eslint-enable global-require */
t.end();
});