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 b5b23bd

Browse filesBrowse files
Trottevanlucas
authored andcommitted
test: make test-http-outgoing-proto 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 bd7822b commit b5b23bd
Copy full SHA for b5b23bd

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

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

‎test/parallel/test-http-outgoing-proto.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-http-outgoing-proto.js
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,14 @@ assert.throws(() => {
9696
message: 'The first argument must be one of type string or buffer'
9797
}));
9898

99-
// addTrailers
99+
// addTrailers()
100+
// The `Error` comes from the JavaScript engine so confirm that it is a
101+
// `TypeError` but do not check the message. It will be different in different
102+
// JavaScript engines.
100103
assert.throws(() => {
101104
const outgoingMessage = new OutgoingMessage();
102105
outgoingMessage.addTrailers();
103-
}, /^TypeError: Cannot convert undefined or null to object$/);
106+
}, TypeError);
104107

105108
assert.throws(() => {
106109
const outgoingMessage = new OutgoingMessage();

0 commit comments

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