diff options
author | Vse Mozhet Byt <vsemozhetbyt@gmail.com> | 2017-07-01 02:29:09 +0300 |
---|---|---|
committer | Jeremiah Senkpiel <fishrock123@rocketmail.com> | 2017-07-19 15:02:06 -0400 |
commit | bc99efc9739d252d5307c78fd40fc80307cd6d98 (patch) | |
tree | ff660b831d97728a8410a588228ca8f452da623d /test/parallel/test-dgram-bind-default-address.js | |
parent | 898fe6135b49585013f35e2a3e1aa68834d8e8b6 (diff) | |
download | node-new-bc99efc9739d252d5307c78fd40fc80307cd6d98.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/parallel/test-dgram-bind-default-address.js')
-rwxr-xr-x | test/parallel/test-dgram-bind-default-address.js | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/test/parallel/test-dgram-bind-default-address.js b/test/parallel/test-dgram-bind-default-address.js index d0b5b60234..762ead7c86 100755 --- a/test/parallel/test-dgram-bind-default-address.js +++ b/test/parallel/test-dgram-bind-default-address.js @@ -21,14 +21,12 @@ 'use strict'; const common = require('../common'); -const assert = require('assert'); -const dgram = require('dgram'); - // skip test in FreeBSD jails since 0.0.0.0 will resolve to default interface -if (common.inFreeBSDJail) { +if (common.inFreeBSDJail) common.skip('In a FreeBSD jail'); - return; -} + +const assert = require('assert'); +const dgram = require('dgram'); dgram.createSocket('udp4').bind(0, common.mustCall(function() { assert.strictEqual(typeof this.address().port, 'number'); @@ -39,7 +37,7 @@ dgram.createSocket('udp4').bind(0, common.mustCall(function() { })); if (!common.hasIPv6) { - common.skip('udp6 part of test, because no IPv6 support'); + common.printSkipMessage('udp6 part of test, because no IPv6 support'); return; } |