From 9e05af7d3108a3d7b00a4b3802c06c4cabc41d88 Mon Sep 17 00:00:00 2001 From: Junliang Yan Date: Fri, 23 Oct 2015 12:48:36 -0400 Subject: [PATCH] test: print helpful err msg on test-dns-ipv6.js The test sometimes fail on an assertion but no useful error message was generated for debugging. Modify the test to generate useful debugging message. PR-URL: https://github.com/nodejs/node/pull/3501 Reviewed-By: Trevor Norris Reviewed-By: Rich Trott --- test/internet/test-dns-ipv6.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/internet/test-dns-ipv6.js b/test/internet/test-dns-ipv6.js index 5a66f8db783f4b..27547edcd84b46 100644 --- a/test/internet/test-dns-ipv6.js +++ b/test/internet/test-dns-ipv6.js @@ -165,7 +165,8 @@ TEST(function test_lookup_all_ipv6(done) { assert.ok(ips.length > 0); ips.forEach(function(ip) { - assert.ok(isIPv6(ip.address)); + assert.ok(isIPv6(ip.address), + 'Invalid IPv6: ' + ip.address.toString()); assert.strictEqual(ip.family, 6); });