|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 2 weeks ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
797 bytes
|
| Line | |
|---|
| 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 | // @ts-expect-error TS is stupid and doesn't know about top level return
|
|---|
| 12 | return;
|
|---|
| 13 | }
|
|---|
| 14 |
|
|---|
| 15 | var hasSymbols = require('../../shams');
|
|---|
| 16 |
|
|---|
| 17 | test('polyfilled Symbols', function (t) {
|
|---|
| 18 | /* eslint-disable global-require */
|
|---|
| 19 | t.equal(hasSymbols(), false, 'hasSymbols is false before polyfilling');
|
|---|
| 20 | require('core-js/fn/symbol');
|
|---|
| 21 | require('core-js/fn/symbol/to-string-tag');
|
|---|
| 22 |
|
|---|
| 23 | require('../tests')(t);
|
|---|
| 24 |
|
|---|
| 25 | var hasSymbolsAfter = hasSymbols();
|
|---|
| 26 | t.equal(hasSymbolsAfter, true, 'hasSymbols is true after polyfilling');
|
|---|
| 27 | /* eslint-enable global-require */
|
|---|
| 28 | t.end();
|
|---|
| 29 | });
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.