You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.4 KiB

4 years ago
  1. var test = require('tape');
  2. require('./legacy-compat');
  3. var common = require('./common');
  4. // we do this to easily wrap each file in a mocha test
  5. // and also have browserify be able to statically analyze this file
  6. var orig_require = require;
  7. var require = function(file) {
  8. test(file, function(t) {
  9. // Store the tape object so tests can access it.
  10. t.on('end', function () { delete common.test; });
  11. common.test = t;
  12. try { orig_require(file); } catch (err) { t.fail(err); }
  13. t.end();
  14. });
  15. };
  16. require('./add-listeners.js');
  17. require('./check-listener-leaks.js');
  18. require('./errors.js');
  19. require('./events-list.js');
  20. require('./listener-count.js');
  21. require('./listeners-side-effects.js');
  22. require('./listeners.js');
  23. require('./max-listeners.js');
  24. if ((function A () {}).name === 'A') {
  25. require('./method-names.js');
  26. } else {
  27. // Function.name is not supported in IE
  28. test('./method-names.js', { skip: true }, function () {});
  29. }
  30. require('./modify-in-emit.js');
  31. require('./num-args.js');
  32. require('./once.js');
  33. require('./prepend.js');
  34. require('./set-max-listeners-side-effects.js');
  35. require('./special-event-names.js');
  36. require('./subclass.js');
  37. if (typeof Symbol === 'function') {
  38. require('./symbols.js');
  39. } else {
  40. // Symbol is not available.
  41. test('./symbols.js', { skip: true }, function () {});
  42. }
  43. require('./remove-all-listeners.js');
  44. require('./remove-listeners.js');