Skip to content

Commit c81b086

Browse files
Trottevanlucas
authored andcommitted
test: make test-repl-harmony engine agnostic
Do not check the error message if it is generated by the JavaScript engine (V8, ChakraCore, etc.). Do confirm that it is a `TypeError`. 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 591a692 commit c81b086

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/parallel/test-repl-harmony.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ const args = ['-i'];
2828
const child = spawn(process.execPath, args);
2929

3030
const input = '(function(){"use strict"; const y=1;y=2})()\n';
31-
const expectOut = /^> TypeError: Assignment to constant variable\.\n/;
31+
// This message will vary based on JavaScript engine, so don't check the message
32+
// contents beyond confirming that the `Error` is a `TypeError`.
33+
const expectOut = /^> TypeError: /;
3234

3335
child.stderr.setEncoding('utf8');
3436
child.stderr.on('data', function(c) {

0 commit comments

Comments
 (0)