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 <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Yuta Hiroto <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
  • Loading branch information
Trott authored and evanlucas committed Nov 13, 2017
1 parent 4604294 commit bd7822b
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 bd7822b

Please sign in to comment.