| 1 |
'use strict'; |
| 2 |
|
| 3 |
var test = require('tape'); |
| 4 |
|
| 5 |
if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') { |
| 6 |
test('has native Symbol support', function (t) { |
| 7 |
t.equal(typeof Symbol, 'function'); |
| 8 |
t.equal(typeof Symbol(), 'symbol'); |
| 9 |
t.end(); |
| 10 |
}); |
| 11 |
return; |
| 12 |
} |
| 13 |
|
| 14 |
var hasSymbolToStringTag = require('../../shams'); |
| 15 |
|
| 16 |
test('polyfilled Symbols', function (t) { |
| 17 |
|
| 18 |
t.equal(hasSymbolToStringTag(), false, 'hasSymbolToStringTag is false before polyfilling'); |
| 19 |
|
| 20 |
require('get-own-property-symbols'); |
| 21 |
|
| 22 |
require('../tests')(t); |
| 23 |
|
| 24 |
var hasToStringTagAfter = hasSymbolToStringTag(); |
| 25 |
t.equal(hasToStringTagAfter, true, 'hasSymbolToStringTag is true after polyfilling'); |
| 26 |
|
| 27 |
t.end(); |
| 28 |
}); |