5880fbdaeb7715f23115a276a408f31896b9deb3e17c6cb7423fc5cdf58e3cf683e68f21a89d1616a99ef3a5f71ec75b1e3c6fb8415771546e9b3d63738cfd 935 B

12345678910111213141516171819202122232425262728293031
  1. 'use strict';
  2. var test = require('tape');
  3. if (typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol') {
  4. test('has native Symbol.toStringTag support', function (t) {
  5. t.equal(typeof Symbol, 'function');
  6. t.equal(typeof Symbol.toStringTag, 'symbol');
  7. t.end();
  8. });
  9. // @ts-expect-error CJS has top-level return
  10. return;
  11. }
  12. var hasSymbolToStringTag = require('../../shams');
  13. test('polyfilled Symbols', function (t) {
  14. /* eslint-disable global-require */
  15. t.equal(hasSymbolToStringTag(), false, 'hasSymbolToStringTag is false before polyfilling');
  16. // @ts-expect-error no types defined
  17. require('core-js/fn/symbol');
  18. // @ts-expect-error no types defined
  19. require('core-js/fn/symbol/to-string-tag');
  20. require('../tests')(t);
  21. var hasToStringTagAfter = hasSymbolToStringTag();
  22. t.equal(hasToStringTagAfter, true, 'hasSymbolToStringTag is true after polyfilling');
  23. /* eslint-enable global-require */
  24. t.end();
  25. });