diff --git a/test/parallel/test-stdin-from-file.js b/test/parallel/test-stdin-from-file.js index f3a78192e5e5aa..9a847118bd670d 100644 --- a/test/parallel/test-stdin-from-file.js +++ b/test/parallel/test-stdin-from-file.js @@ -33,8 +33,7 @@ fs.writeFileSync(tmpFile, string); childProcess.exec(cmd, common.mustCall(function(err, stdout, stderr) { fs.unlinkSync(tmpFile); - if (err) throw err; - console.log(stdout); + assert.ifError(err); assert.strictEqual(stdout, 'hello world\r\n' + string); assert.strictEqual('', stderr); }));