From b44157378af9767a43de8ec3ebbedf3214d2e62c Mon Sep 17 00:00:00 2001 From: jonask Date: Mon, 6 Nov 2017 17:28:03 +0200 Subject: [PATCH] test: use default assertion message 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: https://github.com/nodejs/node/pull/16819 Reviewed-By: Colin Ihrig Reviewed-By: Gireesh Punathil Reviewed-By: Anatoli Papirovski Reviewed-By: Rich Trott --- test/parallel/test-child-process-spawnsync.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-child-process-spawnsync.js b/test/parallel/test-child-process-spawnsync.js index 7b768d8403ac07..6ff7b41edaba71 100644 --- a/test/parallel/test-child-process-spawnsync.js +++ b/test/parallel/test-child-process-spawnsync.js @@ -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;