aboutsummaryrefslogtreecommitdiff
path: root/test/parallel/test-error-reporting.js
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2017-10-17 15:52:40 -0700
committerJames M Snell <jasnell@gmail.com>2017-11-11 17:40:29 -0800
commitf16507bd224a728928258abdcc35b1b43a554d54 (patch)
tree73ffeb8597be328dba020afe21174bddf61a414e /test/parallel/test-error-reporting.js
parentc38c31812e786324cd7b87daf67c771b41534370 (diff)
downloadandroid-node-v8-f16507bd224a728928258abdcc35b1b43a554d54.tar.gz
android-node-v8-f16507bd224a728928258abdcc35b1b43a554d54.tar.bz2
android-node-v8-f16507bd224a728928258abdcc35b1b43a554d54.zip
test: make test-error-reporting engine agnostic
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 <targos@protonmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Diffstat (limited to 'test/parallel/test-error-reporting.js')
-rw-r--r--test/parallel/test-error-reporting.js8
1 files changed, 2 insertions, 6 deletions
diff --git a/test/parallel/test-error-reporting.js b/test/parallel/test-error-reporting.js
index 57b647df79..b9d78b181a 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));
}));