summaryrefslogtreecommitdiff
path: root/test/parallel/test-cli-node-options.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/parallel/test-cli-node-options.js')
-rw-r--r--test/parallel/test-cli-node-options.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/test/parallel/test-cli-node-options.js b/test/parallel/test-cli-node-options.js
index 47fd4b85c7..6b0b9f53f9 100644
--- a/test/parallel/test-cli-node-options.js
+++ b/test/parallel/test-cli-node-options.js
@@ -31,8 +31,7 @@ function disallow(opt) {
const options = {env: {NODE_OPTIONS: opt}};
exec(process.execPath, options, common.mustCall(function(err) {
const message = err.message.split(/\r?\n/)[1];
- const expect = process.execPath + ': ' + opt +
- ' is not allowed in NODE_OPTIONS';
+ const expect = `${process.execPath}: ${opt} is not allowed in NODE_OPTIONS`;
assert.strictEqual(err.code, 9);
assert.strictEqual(message, expect);
@@ -41,7 +40,7 @@ function disallow(opt) {
const printA = require.resolve('../fixtures/printA.js');
-expect('-r ' + printA, 'A\nB\n');
+expect(`-r ${printA}`, 'A\nB\n');
expect('--no-deprecation', 'B\n');
expect('--no-warnings', 'B\n');
expect('--trace-warnings', 'B\n');
@@ -75,7 +74,7 @@ function expect(opt, want) {
if (!RegExp(want).test(stdout)) {
console.error('For %j, failed to find %j in: <\n%s\n>',
opt, expect, stdout);
- assert(false, 'Expected ' + expect);
+ assert(false, `Expected ${expect}`);
}
}));
}