Repositorio del curso CCOM4030 el semestre B91 del proyecto Artesanías con el Instituto de Cultura

get-own-property-symbols.js 686B

12345678910111213141516171819202122232425262728
  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. return;
  10. }
  11. var hasSymbols = require('../../shams');
  12. test('polyfilled Symbols', function (t) {
  13. /* eslint-disable global-require */
  14. t.equal(hasSymbols(), false, 'hasSymbols is false before polyfilling');
  15. require('get-own-property-symbols');
  16. require('../tests')(t);
  17. var hasSymbolsAfter = hasSymbols();
  18. t.equal(hasSymbolsAfter, true, 'hasSymbols is true after polyfilling');
  19. /* eslint-enable global-require */
  20. t.end();
  21. });