diff options
author | Vse Mozhet Byt <vsemozhetbyt@gmail.com> | 2017-07-01 02:29:09 +0300 |
---|---|---|
committer | Vse Mozhet Byt <vsemozhetbyt@gmail.com> | 2017-07-04 12:41:49 +0300 |
commit | 2d2986ae72f2f5c63d95a94f05fa996d9f0609f1 (patch) | |
tree | 7a92ba45eb1ec041a2f9e40b0e63ac5c0be409c0 /test/internet/test-dns-ipv6.js | |
parent | cc1a47dc6b94b2feb4de9e46be9333d81d537783 (diff) | |
download | node-new-2d2986ae72f2f5c63d95a94f05fa996d9f0609f1.tar.gz |
test: simplify test skipping
* Make common.skip() exit.
Also add common.printSkipMessage() for partial skips.
* Don't make needless things before skip
PR-URL: https://github.com/nodejs/node/pull/14021
Fixes: https://github.com/nodejs/node/issues/14016
Reviewed-By: Refael Ackermann <refack@gmail.com>
Diffstat (limited to 'test/internet/test-dns-ipv6.js')
-rw-r--r-- | test/internet/test-dns-ipv6.js | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/test/internet/test-dns-ipv6.js b/test/internet/test-dns-ipv6.js index 31f9df5eab..9b9360c2a1 100644 --- a/test/internet/test-dns-ipv6.js +++ b/test/internet/test-dns-ipv6.js @@ -1,5 +1,8 @@ 'use strict'; const common = require('../common'); +if (!common.hasIPv6) + common.skip('this test, no IPv6 support'); + const assert = require('assert'); const dns = require('dns'); const net = require('net'); @@ -8,11 +11,6 @@ const isIPv6 = net.isIPv6; let running = false; const queue = []; -if (!common.hasIPv6) { - common.skip('this test, no IPv6 support'); - return; -} - function TEST(f) { function next() { const f = queue.shift(); |