diff options
author | cjihrig <cjihrig@gmail.com> | 2016-12-30 10:54:01 -0500 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2017-01-02 09:48:52 -0500 |
commit | 746a46ebddf594370137042b9b3a0af80daff903 (patch) | |
tree | 3defd7922c80a984bd0422cf6bdcf4ab3dd81aa1 /test/parallel/test-fs-readfilesync-pipe-large.js | |
parent | 152bd82de9b49e0497a2fe267c1d04207d837f40 (diff) | |
download | node-new-746a46ebddf594370137042b9b3a0af80daff903.tar.gz |
test: increase usage of assert.ifError()
PR-URL: https://github.com/nodejs/node/pull/10543
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'test/parallel/test-fs-readfilesync-pipe-large.js')
-rw-r--r-- | test/parallel/test-fs-readfilesync-pipe-large.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/test/parallel/test-fs-readfilesync-pipe-large.js b/test/parallel/test-fs-readfilesync-pipe-large.js index 9108118b87..e791618b49 100644 --- a/test/parallel/test-fs-readfilesync-pipe-large.js +++ b/test/parallel/test-fs-readfilesync-pipe-large.js @@ -27,8 +27,7 @@ const f = JSON.stringify(__filename); const node = JSON.stringify(process.execPath); const cmd = `cat ${filename} | ${node} ${f} child`; exec(cmd, { maxBuffer: 1000000 }, function(err, stdout, stderr) { - if (err) console.error(err); - assert(!err, 'it exits normally'); + assert.ifError(err); assert.strictEqual(stdout, dataExpected, 'it reads the file and outputs it'); assert.strictEqual(stderr, '', 'it does not write to stderr'); console.log('ok'); |