Skip to content

Commit

Permalink
test: make test-error-reporting engine agnostic
Browse files Browse the repository at this point in the history
Remove or modify checks in test-error-reporting that only apply to V8
and not to ChakraCore.

PR-URL: #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>
  • Loading branch information
Trott authored and rvagg committed Aug 16, 2018
1 parent e1a7244 commit 6d3cbcb
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions test/parallel/test-error-reporting.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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));
}));

Expand Down

0 comments on commit 6d3cbcb

Please sign in to comment.