source: imaps-frontend/node_modules/has-symbols/test/shams/get-own-property-symbols.js@ 79a0317

main
Last change on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 760 bytes
Line 
1'use strict';
2
3var test = require('tape');
4
5if (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
15var hasSymbols = require('../../shams');
16
17test('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.