Skip to content

Commit f9f8e4e

Browse files
TrottMylesBorins
authored andcommitted
test: refactor test-preload
* assert.equal() -> assert.strictEqual() * replace template string with a string; no variable substitution or concatenation or anything like that PR-URL: #9803 Reviewed-By: Prince John Wesley <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent e7c4dfb commit f9f8e4e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/parallel/test-preload.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ child_process.exec(nodeBinary + ' '
2929
+ fixtureB,
3030
function(err, stdout, stderr) {
3131
if (err) throw err;
32-
assert.equal(stdout, 'A\nB\n');
32+
assert.strictEqual(stdout, 'A\nB\n');
3333
});
3434

3535
// test preloading multiple modules works
@@ -38,7 +38,7 @@ child_process.exec(nodeBinary + ' '
3838
+ fixtureC,
3939
function(err, stdout, stderr) {
4040
if (err) throw err;
41-
assert.equal(stdout, 'A\nB\nC\n');
41+
assert.strictEqual(stdout, 'A\nB\nC\n');
4242
});
4343

4444
// test that preloading a throwing module aborts
@@ -47,7 +47,7 @@ child_process.exec(nodeBinary + ' '
4747
+ fixtureB,
4848
function(err, stdout, stderr) {
4949
if (err) {
50-
assert.equal(stdout, 'A\n');
50+
assert.strictEqual(stdout, 'A\n');
5151
} else {
5252
throw new Error('Preload should have failed');
5353
}
@@ -59,7 +59,7 @@ child_process.exec(nodeBinary + ' '
5959
+ '-e "console.log(\'hello\');"',
6060
function(err, stdout, stderr) {
6161
if (err) throw err;
62-
assert.equal(stdout, 'A\nhello\n');
62+
assert.strictEqual(stdout, 'A\nhello\n');
6363
});
6464

6565
// test that preload placement at other points in the cmdline
@@ -70,7 +70,7 @@ child_process.exec(nodeBinary + ' '
7070
+ preloadOption([fixtureA, fixtureB]),
7171
function(err, stdout, stderr) {
7272
if (err) throw err;
73-
assert.equal(stdout, 'A\nB\nhello\n');
73+
assert.strictEqual(stdout, 'A\nB\nhello\n');
7474
});
7575

7676
child_process.exec(nodeBinary + ' '

0 commit comments

Comments
 (0)