Browse Source

test: skip tests with common.skip

The `common.skip` function adds proper message in TAP format to skipped
tests. It is better not to have the message rewritten in the tests.

PR-URL: https://github.com/nodejs/node/pull/11585
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
v6
Sakthipriyan Vairamani (thefourtheye) 8 years ago
committed by James M Snell
parent
commit
5d4273d122
  1. 2
      test/parallel/test-crypto-authenticated.js
  2. 6
      test/parallel/test-tls-empty-sni-context.js

2
test/parallel/test-crypto-authenticated.js

@ -318,7 +318,7 @@ for (const i in TEST_CASES) {
} }
if (common.hasFipsCrypto && test.iv.length < 24) { if (common.hasFipsCrypto && test.iv.length < 24) {
console.log('1..0 # Skipped: IV len < 12 bytes unsupported in FIPS mode'); common.skip('IV len < 12 bytes unsupported in FIPS mode');
continue; continue;
} }

6
test/parallel/test-tls-empty-sni-context.js

@ -3,16 +3,14 @@
const common = require('../common'); const common = require('../common');
if (!process.features.tls_sni) { if (!process.features.tls_sni) {
console.log('1..0 # Skipped: node compiled without OpenSSL or ' + common.skip('node compiled without OpenSSL or with old OpenSSL version.');
'with old OpenSSL version.');
return; return;
} }
const assert = require('assert'); const assert = require('assert');
if (!common.hasCrypto) { if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto'); return common.skip('missing crypto');
return;
} }
const tls = require('tls'); const tls = require('tls');

Loading…
Cancel
Save