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/parallel/test-setproctitle.js | |
parent | cc1a47dc6b94b2feb4de9e46be9333d81d537783 (diff) | |
download | android-node-v8-2d2986ae72f2f5c63d95a94f05fa996d9f0609f1.tar.gz android-node-v8-2d2986ae72f2f5c63d95a94f05fa996d9f0609f1.tar.bz2 android-node-v8-2d2986ae72f2f5c63d95a94f05fa996d9f0609f1.zip |
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-setproctitle.js')
-rw-r--r-- | test/parallel/test-setproctitle.js | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/test/parallel/test-setproctitle.js b/test/parallel/test-setproctitle.js index 672b6f037d..f4e25a6e8c 100644 --- a/test/parallel/test-setproctitle.js +++ b/test/parallel/test-setproctitle.js @@ -3,9 +3,8 @@ const common = require('../common'); // FIXME add sunos support -if (common.isSunOS) { - return common.skip(`Unsupported platform [${process.platform}]`); -} +if (common.isSunOS) + common.skip(`Unsupported platform [${process.platform}]`); const assert = require('assert'); const exec = require('child_process').exec; @@ -21,9 +20,8 @@ process.title = title; assert.strictEqual(process.title, title); // Test setting the title but do not try to run `ps` on Windows. -if (common.isWindows) { - return common.skip('Windows does not have "ps" utility'); -} +if (common.isWindows) + common.skip('Windows does not have "ps" utility'); // To pass this test on alpine, since Busybox `ps` does not // support `-p` switch, use `ps -o` and `grep` instead. |