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 bb54217

Browse filesBrowse files
richardlauaddaleax
authored andcommitted
test: report actual error code on failure
Add a custom message to parallel/test-dgram-error-message-address so that the actual error code that doesn't match the allowed errors is output on assertion failure. PR-URL: #34134 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Shelley Vohr <codebytere@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
1 parent 1d25e70 commit bb54217
Copy full SHA for bb54217

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

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

‎test/parallel/test-dgram-error-message-address.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-dgram-error-message-address.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ socket_ipv6.on('listening', common.mustNotCall());
4747
socket_ipv6.on('error', common.mustCall(function(e) {
4848
// EAFNOSUPPORT or EPROTONOSUPPORT means IPv6 is disabled on this system.
4949
const allowed = ['EADDRNOTAVAIL', 'EAFNOSUPPORT', 'EPROTONOSUPPORT'];
50-
assert(allowed.includes(e.code));
50+
assert(allowed.includes(e.code), `'${e.code}' was not one of ${allowed}.`);
5151
assert.strictEqual(e.port, undefined);
5252
assert.strictEqual(e.message, `bind ${e.code} 111::1`);
5353
assert.strictEqual(e.address, '111::1');

0 commit comments

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