summaryrefslogtreecommitdiff
path: root/test/parallel/test-preload.js
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2016-12-30 10:54:01 -0500
committercjihrig <cjihrig@gmail.com>2017-01-02 09:48:52 -0500
commit746a46ebddf594370137042b9b3a0af80daff903 (patch)
tree3defd7922c80a984bd0422cf6bdcf4ab3dd81aa1 /test/parallel/test-preload.js
parent152bd82de9b49e0497a2fe267c1d04207d837f40 (diff)
downloadandroid-node-v8-746a46ebddf594370137042b9b3a0af80daff903.tar.gz
android-node-v8-746a46ebddf594370137042b9b3a0af80daff903.tar.bz2
android-node-v8-746a46ebddf594370137042b9b3a0af80daff903.zip
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-preload.js')
-rw-r--r--test/parallel/test-preload.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/parallel/test-preload.js b/test/parallel/test-preload.js
index 4ee564f052..3fbdac9c4d 100644
--- a/test/parallel/test-preload.js
+++ b/test/parallel/test-preload.js
@@ -36,7 +36,7 @@ childProcess.exec(nodeBinary + ' ' +
preloadOption([fixtureA]) + ' ' +
fixtureB,
function(err, stdout, stderr) {
- if (err) throw err;
+ assert.ifError(err);
assert.strictEqual(stdout, 'A\nB\n');
});
@@ -45,7 +45,7 @@ childProcess.exec(nodeBinary + ' ' +
preloadOption([fixtureA, fixtureB]) + ' ' +
fixtureC,
function(err, stdout, stderr) {
- if (err) throw err;
+ assert.ifError(err);
assert.strictEqual(stdout, 'A\nB\nC\n');
});
@@ -66,7 +66,7 @@ childProcess.exec(nodeBinary + ' ' +
preloadOption([fixtureA]) +
'-e "console.log(\'hello\');"',
function(err, stdout, stderr) {
- if (err) throw err;
+ assert.ifError(err);
assert.strictEqual(stdout, 'A\nhello\n');
});
@@ -113,7 +113,7 @@ childProcess.exec(nodeBinary + ' ' +
'-e "console.log(\'hello\');" ' +
preloadOption([fixtureA, fixtureB]),
function(err, stdout, stderr) {
- if (err) throw err;
+ assert.ifError(err);
assert.strictEqual(stdout, 'A\nB\nhello\n');
});
@@ -133,7 +133,7 @@ childProcess.exec(nodeBinary + ' ' +
'--require ' + fixture('cluster-preload.js') + ' ' +
fixture('cluster-preload-test.js'),
function(err, stdout, stderr) {
- if (err) throw err;
+ assert.ifError(err);
assert.ok(/worker terminated with code 43/.test(stdout));
});
@@ -144,6 +144,6 @@ childProcess.exec(nodeBinary + ' ' +
'--require ' + fixture('cluster-preload.js') + ' ' +
'cluster-preload-test.js',
function(err, stdout, stderr) {
- if (err) throw err;
+ assert.ifError(err);
assert.ok(/worker terminated with code 43/.test(stdout));
});