From 38ae95bb0c0c002b7b04040b0aa060e00b760cdd Mon Sep 17 00:00:00 2001 From: cjihrig Date: Mon, 16 Jan 2017 16:11:17 -0500 Subject: [PATCH] test: fix broken assertion This commit fixes a broken assertion in test-cli-eval.js. PR-URL: https://github.com/nodejs/node/pull/10840 Reviewed-By: James M Snell Reviewed-By: Italo A. Casas Reviewed-By: Anna Henningsen --- test/parallel/test-cli-eval.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/parallel/test-cli-eval.js b/test/parallel/test-cli-eval.js index b1f65b204cfbb9..fdd0cc33f068d9 100644 --- a/test/parallel/test-cli-eval.js +++ b/test/parallel/test-cli-eval.js @@ -81,7 +81,8 @@ child.exec(nodejs + ' --eval "require(\'./test/parallel/test-cli-eval.js\')"', child.exec(nodejs + ' -e', common.mustCall(function(err, stdout, stderr) { assert.strictEqual(err.code, 9); assert.strictEqual(stdout, ''); - assert(stderr.match(/node: -e requires an argument\n/)); + assert.strictEqual(stderr.trim(), + `${process.execPath}: -e requires an argument`); })); // empty program should do nothing