main
Last change
on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
760 bytes
|
Rev | Line | |
---|
[d565449] | 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 | });
|
---|
[79a0317] | 11 | // @ts-expect-error TS is stupid and doesn't know about top level return
|
---|
[d565449] | 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 |
|
---|
| 21 | require('get-own-property-symbols');
|
---|
| 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.