Last change
on this file since 6a3a178 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
679 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | 'use strict';
|
---|
| 2 |
|
---|
| 3 | var test = require('tape');
|
---|
| 4 | var hasSymbolToStringTag = require('../');
|
---|
| 5 | var runSymbolTests = require('./tests');
|
---|
| 6 |
|
---|
| 7 | test('interface', function (t) {
|
---|
| 8 | t.equal(typeof hasSymbolToStringTag, 'function', 'is a function');
|
---|
| 9 | t.equal(typeof hasSymbolToStringTag(), 'boolean', 'returns a boolean');
|
---|
| 10 | t.end();
|
---|
| 11 | });
|
---|
| 12 |
|
---|
| 13 | test('Symbol.toStringTag exists', { skip: !hasSymbolToStringTag() }, function (t) {
|
---|
| 14 | runSymbolTests(t);
|
---|
| 15 | t.end();
|
---|
| 16 | });
|
---|
| 17 |
|
---|
| 18 | test('Symbol.toStringTag does not exist', { skip: hasSymbolToStringTag() }, function (t) {
|
---|
| 19 | t.equal(typeof Symbol === 'undefined' ? 'undefined' : typeof Symbol.toStringTag, 'undefined', 'global Symbol.toStringTag is undefined');
|
---|
| 20 | t.end();
|
---|
| 21 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.