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 1ae0e35

Browse filesBrowse files
TrottMyles Borins
authored andcommitted
test: improve assert message
Improves the message when an assertion fires in the test-net-pipe-connect-errors so that it indicates the incorrect value received rather than merely reporting that the value is incorrect. PR-URL: #4461 Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com>
1 parent bf56d50 commit 1ae0e35
Copy full SHA for 1ae0e35

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

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

‎test/parallel/test-net-pipe-connect-errors.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-net-pipe-connect-errors.js
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ var notSocketClient = net.createConnection(emptyTxt, function() {
4242
});
4343

4444
notSocketClient.on('error', function(err) {
45-
assert(err.code === 'ENOTSOCK' || err.code === 'ECONNREFUSED');
45+
assert(err.code === 'ENOTSOCK' || err.code === 'ECONNREFUSED',
46+
`received ${err.code} instead of ENOTSOCK or ECONNREFUSED`);
4647
notSocketErrorFired = true;
4748
});
4849

0 commit comments

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