From 92f766bd8327f98185584e966714bf8831966ab7 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 19 Nov 2019 06:42:07 -0800 Subject: [PATCH] test: improve assertion message in internet dgram test When an error occurs unexpectedly, let the user know what the error is. PR-URL: https://github.com/nodejs/node/pull/30545 Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca --- test/internet/test-dgram-send-cb-quelches-error.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/internet/test-dgram-send-cb-quelches-error.js b/test/internet/test-dgram-send-cb-quelches-error.js index 946b6bbb455325..d989a13216ab10 100644 --- a/test/internet/test-dgram-send-cb-quelches-error.js +++ b/test/internet/test-dgram-send-cb-quelches-error.js @@ -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) {