Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f8337ce

Browse filesBrowse files
Trottevanlucas
authored andcommitted
test: make test-repl-syntax-error-stack agnostic
Revise test so that it does not depend on behavior specific to V8. 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>
1 parent c81b086 commit f8337ce
Copy full SHA for f8337ce

File tree

Expand file treeCollapse file tree

1 file changed

+6
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-1
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-repl-syntax-error-stack.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-repl-syntax-error-stack.js
+6-1Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@ process.on('exit', () => {
1111
});
1212

1313
common.ArrayStream.prototype.write = function(output) {
14-
if (/var foo bar;/.test(output))
14+
// Matching only on a minimal piece of the stack because the string will vary
15+
// greatly depending on the JavaScript engine. V8 includes `;` because it
16+
// displays the line of code (`var foo bar;`) that is causing a problem.
17+
// ChakraCore does not display the line of code but includes `;` in the phrase
18+
// `Expected ';' `.
19+
if (/;/.test(output))
1520
found = true;
1621
};
1722

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.