Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Minor syntax change to fix styling.
  • Loading branch information
Bryce Simonds committed May 24, 2016
commit ad915d02438ef500ce744fc4d5f9b3d107d466da
4 changes: 2 additions & 2 deletions test/parallel/test-cli-eval.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ child.exec(nodejs + ' --eval "require(\'./test/parallel/test-cli-eval.js\')"',
});

// Missing argument should not crash
child.exec(nodejs + ' -e', function (status, stdout, stderr) {
child.exec(nodejs + ' -e', function(status, stdout, stderr) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

As the assertion happens within the callback, its better to use common.mustCall

assert.notStrictEqual(status, null);
assert.equal(status.code, 9);
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.

nit: It’s generally preferred to use assert.strictEqual over assert.equal

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Use strictEqual

});

// empty program should do nothing
child.exec(nodejs + ' -e ""', function (status, stdout, stderr) {
child.exec(nodejs + ' -e ""', function(status, stdout, stderr) {
assert.equal(stdout, '');
assert.equal(stderr, '');
});
Expand Down