Last change
on this file since e29cc2e 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
|
---|
4 | module.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.