Skip to content

Commit

Permalink
test: skip the test with proper TAP message
Browse files Browse the repository at this point in the history
On Windows, the test simply returns which will be counted as passed.
The test actually skips the rest of the test. So proper TAP message has
to be included while skipping.

This patch uses `common.skip` rather than `console.log` to print the
skip messages.

PR-URL: nodejs/node#11584
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
thefourtheye authored and andrew749 committed Jul 19, 2017
1 parent 41a3ace commit 4d8637f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions test/parallel/test-setproctitle.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ const common = require('../common');

// FIXME add sunos support
if (!(common.isFreeBSD || common.isOSX || common.isLinux)) {
console.log(`1..0 # Skipped: Unsupported platform [${process.platform}]`);
return;
return common.skip(`Unsupported platform [${process.platform}]`);
}

const assert = require('assert');
Expand Down

0 comments on commit 4d8637f

Please sign in to comment.