diff --git a/test.js b/test.js index 066597e..9b865de 100644 --- a/test.js +++ b/test.js @@ -141,11 +141,11 @@ test('functions', function (t) { t.end(); }); -test('symbols', { skip: typeof Symbol !== 'function' }, function (t) { +var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol'; +test('symbols', { skip: !hasSymbols }, function (t) { var foo = 'foo'; var fooSym = Symbol(foo); t.ok(isEqual(fooSym, fooSym), 'Symbol("foo") is equal to itself'); - t.ok(isEqual(String(fooSym), String(Symbol(foo))), 'Symbol("foo") stringifies the same even for different instances'); t.notOk(isEqual(Symbol(foo), Symbol(foo)), 'Symbol("foo") is not equal to Symbol("foo"), even when the string is the same instance'); t.end();