summaryrefslogtreecommitdiff
path: root/test/parallel/test-net-pipe-connect-errors.js
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2015-12-28 21:28:36 -0800
committerRich Trott <rtrott@gmail.com>2015-12-30 22:26:58 -0800
commit242d07890fbb17c9d7e9c8cd2090b069b37afa1b (patch)
tree4d8e9f6347a6fbe0adfec51cea422bf4d6afade9 /test/parallel/test-net-pipe-connect-errors.js
parent78fd43514f1dc5144c71f9dbc2be3f6698da5522 (diff)
downloadandroid-node-v8-242d07890fbb17c9d7e9c8cd2090b069b37afa1b.tar.gz
android-node-v8-242d07890fbb17c9d7e9c8cd2090b069b37afa1b.tar.bz2
android-node-v8-242d07890fbb17c9d7e9c8cd2090b069b37afa1b.zip
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: https://github.com/nodejs/node/pull/4461 Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com>
Diffstat (limited to 'test/parallel/test-net-pipe-connect-errors.js')
-rw-r--r--test/parallel/test-net-pipe-connect-errors.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/parallel/test-net-pipe-connect-errors.js b/test/parallel/test-net-pipe-connect-errors.js
index 0f4704ed19..8e341015d9 100644
--- a/test/parallel/test-net-pipe-connect-errors.js
+++ b/test/parallel/test-net-pipe-connect-errors.js
@@ -44,7 +44,8 @@ var notSocketClient = net.createConnection(emptyTxt, function() {
});
notSocketClient.on('error', function(err) {
- assert(err.code === 'ENOTSOCK' || err.code === 'ECONNREFUSED');
+ assert(err.code === 'ENOTSOCK' || err.code === 'ECONNREFUSED',
+ `received ${err.code} instead of ENOTSOCK or ECONNREFUSED`);
notSocketErrorFired = true;
});