Browse Source

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: https://github.com/nodejs/node/pull/9803
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
v4.x
Rich Trott 8 years ago
committed by Myles Borins
parent
commit
f9f8e4ee3e
No known key found for this signature in database GPG Key ID: 933B01F40B5CA946
  1. 10
      test/parallel/test-preload.js

10
test/parallel/test-preload.js

@ -29,7 +29,7 @@ child_process.exec(nodeBinary + ' '
+ fixtureB,
function(err, stdout, stderr) {
if (err) throw err;
assert.equal(stdout, 'A\nB\n');
assert.strictEqual(stdout, 'A\nB\n');
});
// test preloading multiple modules works
@ -38,7 +38,7 @@ child_process.exec(nodeBinary + ' '
+ fixtureC,
function(err, stdout, stderr) {
if (err) throw err;
assert.equal(stdout, 'A\nB\nC\n');
assert.strictEqual(stdout, 'A\nB\nC\n');
});
// test that preloading a throwing module aborts
@ -47,7 +47,7 @@ child_process.exec(nodeBinary + ' '
+ fixtureB,
function(err, stdout, stderr) {
if (err) {
assert.equal(stdout, 'A\n');
assert.strictEqual(stdout, 'A\n');
} else {
throw new Error('Preload should have failed');
}
@ -59,7 +59,7 @@ child_process.exec(nodeBinary + ' '
+ '-e "console.log(\'hello\');"',
function(err, stdout, stderr) {
if (err) throw err;
assert.equal(stdout, 'A\nhello\n');
assert.strictEqual(stdout, 'A\nhello\n');
});
// test that preload placement at other points in the cmdline
@ -70,7 +70,7 @@ child_process.exec(nodeBinary + ' '
+ preloadOption([fixtureA, fixtureB]),
function(err, stdout, stderr) {
if (err) throw err;
assert.equal(stdout, 'A\nB\nhello\n');
assert.strictEqual(stdout, 'A\nB\nhello\n');
});
child_process.exec(nodeBinary + ' '

Loading…
Cancel
Save