Skip to content

Commit

Permalink
test: refactor test-preload
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
Trott authored and MylesBorins committed Feb 1, 2017
1 parent e7c4dfb commit f9f8e4e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/parallel/test-preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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');
}
Expand All @@ -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
Expand All @@ -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 + ' '
Expand Down

0 comments on commit f9f8e4e

Please sign in to comment.