index.js 518 B

12345678910111213141516171819202122
  1. 'use strict';
  2. module.exports = function (t, a, d) {
  3. var invoked;
  4. a(t(function () {
  5. a(arguments.length, 0, "Arguments");
  6. invoked = true;
  7. }), undefined, "Return");
  8. a(invoked, undefined, "Is not run immediately");
  9. setTimeout(function () {
  10. a(invoked, true, "Run in next tick");
  11. invoked = [];
  12. t(function () { invoked.push(0); });
  13. t(function () { invoked.push(1); });
  14. t(function () { invoked.push(2); });
  15. setTimeout(function () {
  16. a.deep(invoked, [0, 1, 2], "Serial");
  17. d();
  18. }, 10);
  19. }, 10);
  20. };