mirror of
https://github.com/nodejs/node.git
synced 2025-05-12 03:10:50 +00:00

Currently test-tls-legacy-deprecated will fail if node was built using --without-ssl. This commit adds a check to verify is crypto support exists and if not skip this test. PR-URL: https://github.com/nodejs/node/pull/11747 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
17 lines
382 B
JavaScript
17 lines
382 B
JavaScript
// Flags: --no-warnings
|
|
'use strict';
|
|
const common = require('../common');
|
|
if (!common.hasCrypto) {
|
|
common.skip('missing crypto');
|
|
return;
|
|
}
|
|
const assert = require('assert');
|
|
const tls = require('tls');
|
|
|
|
common.expectWarning(
|
|
'DeprecationWarning',
|
|
'tls.createSecurePair() is deprecated. Please use tls.Socket instead.'
|
|
);
|
|
|
|
assert.doesNotThrow(() => tls.createSecurePair());
|