0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/test/parallel/test-tls-legacy-deprecated.js

16 lines
372 B
JavaScript
Raw Normal View History

// Flags: --no-warnings
'use strict';
const common = require('../common');
if (!common.hasCrypto)
common.skip('missing crypto');
const assert = require('assert');
const tls = require('tls');
common.expectWarning(
'DeprecationWarning',
'tls.createSecurePair() is deprecated. Please use tls.TLSSocket instead.'
);
assert.doesNotThrow(() => tls.createSecurePair());