選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

index.js 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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');