minimal adjustments
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / has-symbols / test / shams / core-js.js
1 'use strict';
2
3 var test = require('tape');
4
5 if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') {
6         test('has native Symbol support', function (t) {
7                 t.equal(typeof Symbol, 'function');
8                 t.equal(typeof Symbol(), 'symbol');
9                 t.end();
10         });
11         return;
12 }
13
14 var hasSymbols = require('../../shams');
15
16 test('polyfilled Symbols', function (t) {
17         /* eslint-disable global-require */
18         t.equal(hasSymbols(), false, 'hasSymbols 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 hasSymbolsAfter = hasSymbols();
25         t.equal(hasSymbolsAfter, true, 'hasSymbols is true after polyfilling');
26         /* eslint-enable global-require */
27         t.end();
28 });