source: trip-planner-front/node_modules/has-tostringtag/test/tests.js@ 8d391a1

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

initial commit

  • Property mode set to 100644
File size: 427 bytes
Line 
1'use strict';
2
3// eslint-disable-next-line consistent-return
4module.exports = function runSymbolTests(t) {
5 t.equal(typeof Symbol, 'function', 'global Symbol is a function');
6 t.ok(Symbol.toStringTag, 'Symbol.toStringTag exists');
7
8 if (typeof Symbol !== 'function' || !Symbol.toStringTag) { return false; }
9
10 var obj = {};
11 obj[Symbol.toStringTag] = 'test';
12
13 t.equal(Object.prototype.toString.call(obj), '[object test]');
14};
Note: See TracBrowser for help on using the repository browser.