Browse Source

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 <trev.norris@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
process-exit-stdio-flushing
Junliang Yan 9 years ago
committed by Rich Trott
parent
commit
f4c0ed4af2
  1. 3
      test/internet/test-dns-ipv6.js

3
test/internet/test-dns-ipv6.js

@ -165,7 +165,8 @@ TEST(function test_lookup_all_ipv6(done) {
assert.ok(ips.length > 0); assert.ok(ips.length > 0);
ips.forEach(function(ip) { ips.forEach(function(ip) {
assert.ok(isIPv6(ip.address)); assert.ok(isIPv6(ip.address),
'Invalid IPv6: ' + ip.address.toString());
assert.strictEqual(ip.family, 6); assert.strictEqual(ip.family, 6);
}); });

Loading…
Cancel
Save