From 34d7d752a297c70f73670728e58fc478a5142858 Mon Sep 17 00:00:00 2001 From: Ansgar Grunseid Date: Wed, 17 Oct 2018 13:18:45 -0700 Subject: [PATCH] Accept arguments to process.nextTick(fn, ...args), just like Node.js's process.nextTick(). --- mock/process.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mock/process.js b/mock/process.js index 04f7959..ad1fb34 100644 --- a/mock/process.js +++ b/mock/process.js @@ -1,5 +1,9 @@ exports.nextTick = function nextTick(fn) { - setTimeout(fn, 0); + var args = Array.prototype.slice.call(arguments); + args.shift(); + setTimeout(function () { + fn.apply(null, args); + }, 0); }; exports.platform = exports.arch =