From a6299d63226116ab2bfd66e74dd58aa84d8e2466 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 17 Oct 2017 15:52:40 -0700 Subject: [PATCH] test: make test-error-reporting engine agnostic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove or modify checks in test-error-reporting that only apply to V8 and not to ChakraCore. PR-URL: https://github.com/nodejs/node/pull/16272 Reviewed-By: Michaël Zasso Reviewed-By: Refael Ackermann Reviewed-By: Yuta Hiroto Reviewed-By: Joyee Cheung Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Benjamin Gruenbaum Reviewed-By: Tobias Nießen --- test/parallel/test-error-reporting.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/test/parallel/test-error-reporting.js b/test/parallel/test-error-reporting.js index 57b647df792c90..b9d78b181aef47 100644 --- a/test/parallel/test-error-reporting.js +++ b/test/parallel/test-error-reporting.js @@ -32,17 +32,14 @@ function errExec(script, callback) { assert.ok(err); // More than one line of error output. - assert.ok(stderr.split('\n').length > 2); - - // Assert the script is mentioned in error output. - assert.ok(stderr.includes(script)); + assert.ok(stderr.split('\n').length); // Proxy the args for more tests. callback(err, stdout, stderr); }); } -const syntaxErrorMessage = /SyntaxError/; +const syntaxErrorMessage = /\bSyntaxError\b/; // Simple throw error @@ -65,7 +62,6 @@ errExec('throws_error3.js', common.mustCall(function(err, stdout, stderr) { // throw ILLEGAL error errExec('throws_error4.js', common.mustCall(function(err, stdout, stderr) { - assert.ok(/\/\*\*/.test(stderr)); assert.ok(syntaxErrorMessage.test(stderr)); }));