mirror of
https://github.com/Sevichecc/Urara-Blog.git
synced 2025-05-02 01:59:31 +08:00
14 lines
427 B
Text
14 lines
427 B
Text
'use strict';
|
|
|
|
// eslint-disable-next-line consistent-return
|
|
module.exports = function runSymbolTests(t) {
|
|
t.equal(typeof Symbol, 'function', 'global Symbol is a function');
|
|
t.ok(Symbol.toStringTag, 'Symbol.toStringTag exists');
|
|
|
|
if (typeof Symbol !== 'function' || !Symbol.toStringTag) { return false; }
|
|
|
|
var obj = {};
|
|
obj[Symbol.toStringTag] = 'test';
|
|
|
|
t.equal(Object.prototype.toString.call(obj), '[object test]');
|
|
};
|