50f32bbe3db6bb29bfc4614aa21e66d7a43b1508623b2e36e53b5a317d4ac2cc29737127198a9dc38349872063cea8a4022933d6d6359a66da10df636f2910 679 B

123456789101112131415161718192021
  1. 'use strict';
  2. var test = require('tape');
  3. var hasSymbolToStringTag = require('../');
  4. var runSymbolTests = require('./tests');
  5. test('interface', function (t) {
  6. t.equal(typeof hasSymbolToStringTag, 'function', 'is a function');
  7. t.equal(typeof hasSymbolToStringTag(), 'boolean', 'returns a boolean');
  8. t.end();
  9. });
  10. test('Symbol.toStringTag exists', { skip: !hasSymbolToStringTag() }, function (t) {
  11. runSymbolTests(t);
  12. t.end();
  13. });
  14. test('Symbol.toStringTag does not exist', { skip: hasSymbolToStringTag() }, function (t) {
  15. t.equal(typeof Symbol === 'undefined' ? 'undefined' : typeof Symbol.toStringTag, 'undefined', 'global Symbol.toStringTag is undefined');
  16. t.end();
  17. });