8d09041faf1aa5caa5afcfe51589feb7e512b5f759f4651ea0156ddd1a25b78b7ddbbe6bd75f235340e628eda0dc996ee1bba3437aff0cb8c73b25e68f0ef9 828 B

123456789101112131415161718192021222324252627282930
  1. 'use strict';
  2. var test = require('tape');
  3. if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') {
  4. test('has native Symbol support', function (t) {
  5. t.equal(typeof Symbol, 'function');
  6. t.equal(typeof Symbol(), '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('get-own-property-symbols');
  18. require('../tests')(t);
  19. var hasToStringTagAfter = hasSymbolToStringTag();
  20. t.equal(hasToStringTagAfter, true, 'hasSymbolToStringTag is true after polyfilling');
  21. /* eslint-enable global-require */
  22. t.end();
  23. });