source: trip-planner-front/node_modules/has-tostringtag/test/shams/core-js.js@ 6a3a178

Last change on this file since 6a3a178 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 813 bytes
Line 
1'use strict';
2
3var test = require('tape');
4
5if (typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol') {
6 test('has native Symbol.toStringTag support', function (t) {
7 t.equal(typeof Symbol, 'function');
8 t.equal(typeof Symbol.toStringTag, 'symbol');
9 t.end();
10 });
11 return;
12}
13
14var hasSymbolToStringTag = require('../../shams');
15
16test('polyfilled Symbols', function (t) {
17 /* eslint-disable global-require */
18 t.equal(hasSymbolToStringTag(), false, 'hasSymbolToStringTag is false before polyfilling');
19 require('core-js/fn/symbol');
20 require('core-js/fn/symbol/to-string-tag');
21
22 require('../tests')(t);
23
24 var hasToStringTagAfter = hasSymbolToStringTag();
25 t.equal(hasToStringTagAfter, true, 'hasSymbolToStringTag is true after polyfilling');
26 /* eslint-enable global-require */
27 t.end();
28});
Note: See TracBrowser for help on using the repository browser.