Browse Source

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>
v6
Rob Adelmann 8 years ago
committed by James M Snell
parent
commit
407c1ad66c
  1. 3
      test/parallel/test-stdin-from-file.js

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

Loading…
Cancel
Save