Skip to content

Commit

Permalink
Skip method-name tests if Function.name is not available
Browse files Browse the repository at this point in the history
And log a message if the Symbol test was skipped, too.
  • Loading branch information
goto-bus-stop committed May 18, 2018
1 parent 567f4d3 commit 59d3074
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions tests/index.js
Expand Up @@ -19,13 +19,23 @@ require('./listener-count.js');
require('./listeners-side-effects.js');
require('./listeners.js');
require('./max-listeners.js');
require('./method-names.js');
if ((function A () {}).name === 'A') {
require('./method-names.js');
} else {
// Function.name is not supported in IE
test('./method-names.js', { skip: true }, function () {});
}
require('./modify-in-emit.js');
require('./num-args.js');
require('./once.js');
require('./prepend.js');
require('./set-max-listeners-side-effects.js');
require('./subclass.js');
if (typeof Symbol === 'function') require('./symbols.js');
if (typeof Symbol === 'function') {
require('./symbols.js');
} else {
// Symbol is not available.
test('./symbols.js', { skip: true }, function () {});
}
require('./remove-all-listeners.js');
require('./remove-listeners.js');

0 comments on commit 59d3074

Please sign in to comment.