summaryrefslogtreecommitdiff
path: root/test/parallel/test-process-exit-code.js
diff options
context:
space:
mode:
authorGibson Fahnestock <gib@uk.ibm.com>2017-01-08 15:36:25 +0000
committerGibson Fahnestock <gib@uk.ibm.com>2017-01-11 14:19:26 +0000
commit3d2aef3979cf7ac986908dbb9879216caec4a3ff (patch)
tree0566cf3150e4b9bcce3359814b3927c562bdbc42 /test/parallel/test-process-exit-code.js
parent81fef918d5a8a9aa297b78ade5e58d6caa3176e6 (diff)
downloadnode-new-3d2aef3979cf7ac986908dbb9879216caec4a3ff.tar.gz
test: s/assert.equal/assert.strictEqual/
Use assert.strictEqual instead of assert.equal in tests, manually convert types where necessary. PR-URL: https://github.com/nodejs/node/pull/10698 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Diffstat (limited to 'test/parallel/test-process-exit-code.js')
-rw-r--r--test/parallel/test-process-exit-code.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/parallel/test-process-exit-code.js b/test/parallel/test-process-exit-code.js
index 337502ffcb..8d0ed1b33b 100644
--- a/test/parallel/test-process-exit-code.js
+++ b/test/parallel/test-process-exit-code.js
@@ -22,14 +22,14 @@ switch (process.argv[2]) {
function child1() {
process.exitCode = 42;
process.on('exit', function(code) {
- assert.equal(code, 42);
+ assert.strictEqual(code, 42);
});
}
function child2() {
process.exitCode = 99;
process.on('exit', function(code) {
- assert.equal(code, 42);
+ assert.strictEqual(code, 42);
});
process.exit(42);
}
@@ -37,7 +37,7 @@ function child2() {
function child3() {
process.exitCode = 99;
process.on('exit', function(code) {
- assert.equal(code, 0);
+ assert.strictEqual(code, 0);
});
process.exit(0);
}
@@ -56,7 +56,7 @@ function child4() {
function child5() {
process.exitCode = 95;
process.on('exit', function(code) {
- assert.equal(code, 95);
+ assert.strictEqual(code, 95);
process.exitCode = 99;
});
}
@@ -75,7 +75,7 @@ function test(arg, exit) {
const f = __filename;
const option = { stdio: [ 0, 1, 'ignore' ] };
spawn(node, [f, arg], option).on('exit', function(code) {
- assert.equal(code, exit, 'wrong exit for ' +
+ assert.strictEqual(code, exit, 'wrong exit for ' +
arg + '\nexpected:' + exit +
' but got:' + code);
console.log('ok - %s exited with %d', arg, exit);