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 025eadf

Browse filesBrowse files
Trottevanlucas
authored andcommitted
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
Copy full SHA for 025eadf

File tree

Expand file treeCollapse file tree

1 file changed

+5
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-3
lines changed
Open diff view settings
Collapse file

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

Copy file name to clipboardExpand all lines: test/parallel/test-console-count.js
+5-3Lines changed: 5 additions & 3 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.