Skip to content

Commit

Permalink
[Tests] use has-symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Sep 21, 2018
1 parent 23c2e2e commit da43e4d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"es6-shim": "^0.35.3",
"eslint": "^4.19.1",
"foreach": "^2.0.5",
"has-symbols": "^1.0.0",
"make-arrow-function": "^1.1.0",
"make-generator-function": "^1.1.0",
"nsp": "^3.2.1",
Expand Down
5 changes: 2 additions & 3 deletions test/native.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

var test = require('tape');
var isEqual = require('../');
var isSymbol = require('is-symbol');
var hasSymbols = require('has-symbols');
var genFn = require('make-generator-function');
var hasGeneratorSupport = typeof genFn === 'function';
var arrowFunctions = require('make-arrow-function').list();
Expand Down Expand Up @@ -250,8 +250,7 @@ test('functions', function (t) {
t.end();
});

var hasSymbols = typeof Symbol === 'function' && isSymbol(Symbol('foo'));
test('symbols', { skip: !hasSymbols }, function (t) {
test('symbols', { skip: !hasSymbols() }, function (t) {
var foo = 'foo';
var fooSym = Symbol(foo);
var objectFooSym = Object(fooSym);
Expand Down
5 changes: 2 additions & 3 deletions test/why.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

var test = require('tape');
var isEqualWhy = require('../why');
var isSymbol = require('is-symbol');
var hasSymbols = require('has-symbols');
var genFn = require('make-generator-function');
var hasGeneratorSupport = typeof genFn === 'function';
var arrowFunctions = require('make-arrow-function').list();
Expand Down Expand Up @@ -391,8 +391,7 @@ test('functions', function (t) {
t.end();
});

var hasSymbols = typeof Symbol === 'function' && isSymbol(Symbol('foo'));
test('symbols', { skip: !hasSymbols }, function (t) {
test('symbols', { skip: !hasSymbols() }, function (t) {
var foo = 'foo';
var fooSym = Symbol(foo);
var objectFooSym = Object(fooSym);
Expand Down

0 comments on commit da43e4d

Please sign in to comment.