test: refactor test-stdin-from-file

Remove console.log statement. Replace error check with
assert.ifError().

PR-URL: https://github.com/nodejs/node/pull/10331
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Rob Adelmann 2016-12-18 19:56:18 -08:00 committed by James M Snell
parent 4c9dd6822e
commit 407c1ad66c

View File

@ -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);
}));