From 0db54ab98ed510cb30d5845dd9929658fcc355a5 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sun, 6 Nov 2016 20:20:03 -0800 Subject: [PATCH] test: refactor inspector-helper.js There are two instances of `setTimeout()` called without a duration in `inspector-helper.js`. Change to `setImmediate()` for clarity that it isn't a mistake. PR-URL: https://github.com/nodejs/node/pull/9499 Reviewed-By: Colin Ihrig Reviewed-By: Jeremiah Senkpiel Reviewed-By: James M Snell Reviewed-By: Eugene Ostroukhov Reviewed-By: Prince John Wesley Reviewed-By: Luigi Pinca --- test/inspector/inspector-helper.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/inspector/inspector-helper.js b/test/inspector/inspector-helper.js index 76fb33dba2be4d..a02b6b9a5bc506 100644 --- a/test/inspector/inspector-helper.js +++ b/test/inspector/inspector-helper.js @@ -259,7 +259,7 @@ TestSession.prototype.expectStderrOutput = function(regexp) { TestSession.prototype.runNext_ = function() { if (this.task_) { - setTimeout(() => { + setImmediate(() => { this.task_(() => { this.task_ = this.task_.next_; this.runNext_(); @@ -338,7 +338,7 @@ Harness.prototype.addStderrFilter = function(regexp, callback) { }; Harness.prototype.run_ = function() { - setTimeout(() => { + setImmediate(() => { this.task_(() => { this.task_ = this.task_.next_; if (this.task_)