Skip to content

Commit

Permalink
test: improve assertion message in internet dgram test
Browse files Browse the repository at this point in the history
When an error occurs unexpectedly, let the user know what the error is.

PR-URL: #30545
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Trott authored and MylesBorins committed Nov 21, 2019

Unverified

The email in this signature doesn’t match the committer email.
1 parent a5f25ec commit 92f766b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/internet/test-dgram-send-cb-quelches-error.js
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ function callbackOnly(err) {
}

function onEvent(err) {
assert.fail('Error should not be emitted if there is callback');
assert.fail(`Error should not be emitted if there is callback: ${err}`);
}

function onError(err) {

0 comments on commit 92f766b

Please sign in to comment.