mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
d11f7d54f3
`tls.Socket` does not exist, and the deprecation message should refer to `tls.TLSSocket` (like the documentation for the deprecation message already does). PR-URL: https://github.com/nodejs/node/pull/17561 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
16 lines
372 B
JavaScript
16 lines
372 B
JavaScript
// 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());
|