Skip to content

Commit 025eadf

Browse files
Trottevanlucas
authored andcommittedNov 13, 2017
test: make test-console-count 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 <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 c74467f commit 025eadf

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed
 

‎test/parallel/test-console-count.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,12 @@ assert.strictEqual(buf, 'default: 2\n');
5454

5555
process.stdout.write = stdoutWrite;
5656

57-
// Symbol labels do not work
57+
// Symbol labels do not work. Only check that the `Error` is a `TypeError`. Do
58+
// not check the message because it is different depending on the JavaScript
59+
// engine.
5860
assert.throws(
5961
() => console.count(Symbol('test')),
60-
/^TypeError: Cannot convert a Symbol value to a string$/);
62+
TypeError);
6163
assert.throws(
6264
() => console.countReset(Symbol('test')),
63-
/^TypeError: Cannot convert a Symbol value to a string$/);
65+
TypeError);

0 commit comments

Comments
 (0)
Please sign in to comment.