Skip to content

Commit

Permalink
test: use default assertion message
Browse files Browse the repository at this point in the history
In test-child-process-spawnsync, the assert.strictEqual() custom
message was hiding information about why the test has failed. It
just showed what value is expected and in case of failure we want to
know which value has caused test to fail.

PR-URL: #16819
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
  • Loading branch information
jonask-wix authored and MylesBorins committed Nov 16, 2017
1 parent fab5598 commit ca27880
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/parallel/test-child-process-spawnsync.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const spawnSync = require('child_process').spawnSync;
// Echo does different things on Windows and Unix, but in both cases, it does
// more-or-less nothing if there are no parameters
const ret = spawnSync('sleep', ['0']);
assert.strictEqual(ret.status, 0, 'exit status should be zero');
assert.strictEqual(ret.status, 0);

// Error test when command does not exist
const ret_err = spawnSync('command_does_not_exist', ['bar']).error;
Expand Down

0 comments on commit ca27880

Please sign in to comment.