test: make test-repl-syntax-error-stack agnostic
Revise test so that it does not depend on behavior specific to V8. 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>
This commit is contained in:
parent
9ae8416645
commit
c68e35258c
@ -11,7 +11,12 @@ process.on('exit', () => {
|
||||
});
|
||||
|
||||
common.ArrayStream.prototype.write = function(output) {
|
||||
if (/var foo bar;/.test(output))
|
||||
// Matching only on a minimal piece of the stack because the string will vary
|
||||
// greatly depending on the JavaScript engine. V8 includes `;` because it
|
||||
// displays the line of code (`var foo bar;`) that is causing a problem.
|
||||
// ChakraCore does not display the line of code but includes `;` in the phrase
|
||||
// `Expected ';' `.
|
||||
if (/;/.test(output))
|
||||
found = true;
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user