Skip to content

Commit bd7822b

Browse files
Trottevanlucas
authored andcommitted
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: #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]>
1 parent 4604294 commit bd7822b

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

test/parallel/test-error-reporting.js

+2-6
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,14 @@ function errExec(script, callback) {
3232
assert.ok(err);
3333

3434
// More than one line of error output.
35-
assert.ok(stderr.split('\n').length > 2);
36-
37-
// Assert the script is mentioned in error output.
38-
assert.ok(stderr.includes(script));
35+
assert.ok(stderr.split('\n').length);
3936

4037
// Proxy the args for more tests.
4138
callback(err, stdout, stderr);
4239
});
4340
}
4441

45-
const syntaxErrorMessage = /SyntaxError/;
42+
const syntaxErrorMessage = /\bSyntaxError\b/;
4643

4744

4845
// Simple throw error
@@ -65,7 +62,6 @@ errExec('throws_error3.js', common.mustCall(function(err, stdout, stderr) {
6562

6663
// throw ILLEGAL error
6764
errExec('throws_error4.js', common.mustCall(function(err, stdout, stderr) {
68-
assert.ok(/\/\*\*/.test(stderr));
6965
assert.ok(syntaxErrorMessage.test(stderr));
7066
}));
7167

0 commit comments

Comments
 (0)