From 04d82a5122bf94b4b27ff5ff0a1eb42ae0ef9451 Mon Sep 17 00:00:00 2001 From: Rob Adelmann Date: Sun, 18 Dec 2016 19:56:18 -0800 Subject: [PATCH] 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 Reviewed-By: Italo A. Casas Reviewed-By: Luigi Pinca Reviewed-By: James M Snell --- test/parallel/test-stdin-from-file.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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); }));