Skip to content

Commit

Permalink
test: refactor inspector-helper.js
Browse files Browse the repository at this point in the history
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: #9499
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
Trott authored and addaleax committed Nov 22, 2016
1 parent dab3e45 commit 342d8e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/inspector/inspector-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -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_();
Expand Down Expand Up @@ -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_)
Expand Down

0 comments on commit 342d8e0

Please sign in to comment.