Skip to content
Prev Previous commit
Next Next commit
cluster: Changed multi-line template string in test-inspect-support-f…
…or-node_options

Changed multi-line template string in test-inspect-support-for-node_options
as per feedback from @jasnell. PR #19165

Fixes : #19026
  • Loading branch information
sameer-coder committed Mar 16, 2018
commit eb8f56736d27fd6b5253d857c2ed453eab99f3c9
3 changes: 1 addition & 2 deletions test/parallel/test-inspect-support-for-node_options.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ function checkForInspectSupport(flag) {

cluster.on('exit', (worker, code, signal) => {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrap the callback in common.mustCall.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

if (worker.exitedAfterDisconnect === false) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be an assert rather than if-fail?

Copy link
Copy Markdown
Contributor Author

@sameer-coder sameer-coder Mar 16, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this look ok?

    cluster.on('exit', common.mustCall((worker, code, signal) => {
      const errMsg = `For NODE_OPTIONS ${nodeOptions}, failed to start cluster`;
      assert.strictEqual(worker.exitedAfterDisconnect, true, errMsg);
    }, 2));

assert.fail(`For ${nodeOptions}, failed to start cluster\
with inspect option`);
assert.fail(`For NODE_OPTIONS ${nodeOptions}, failed to start cluster`);
}
});
}
Expand Down