From f9f8e4ee3ebb5d852388e19700bfb136e20fcb82 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Fri, 25 Nov 2016 20:47:56 -0800 Subject: [PATCH] test: refactor test-preload MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 Reviewed-By: Michaƫl Zasso Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca --- test/parallel/test-preload.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/parallel/test-preload.js b/test/parallel/test-preload.js index 080c93ae7e14eb..824cdbc98f9492 100644 --- a/test/parallel/test-preload.js +++ b/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 + ' '