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 4604294

Browse filesBrowse files
Trottevanlucas
authored andcommitted
test: make test-console 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 025eadf commit 4604294
Copy full SHA for 4604294

File tree

Expand file treeCollapse file tree

1 file changed

+4
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-2
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-console.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-console.js
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,12 @@ assert.doesNotThrow(function() {
4242
console.timeEnd('label');
4343
});
4444

45+
// Check that the `Error` is a `TypeError` but do not check the message as it
46+
// will be different in different JavaScript engines.
4547
assert.throws(() => console.time(Symbol('test')),
46-
/^TypeError: Cannot convert a Symbol value to a string$/);
48+
TypeError);
4749
assert.throws(() => console.timeEnd(Symbol('test')),
48-
/^TypeError: Cannot convert a Symbol value to a string$/);
50+
TypeError);
4951

5052

5153
// an Object with a custom .inspect() function

0 commit comments

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