Skip to content

Commit

Permalink
Removing this unnecessary test line, and refactoring up hasSymbols.
Browse files Browse the repository at this point in the history
ljharb committed Dec 15, 2014

Verified

This commit was signed with the committer’s verified signature.
booc0mtaco Holloway
1 parent 5311996 commit 95218d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test.js
Original file line number Diff line number Diff line change
@@ -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();

0 comments on commit 95218d6

Please sign in to comment.