tls: use correct class name in deprecation message
`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>
This commit is contained in:
parent
727339e9c2
commit
d11f7d54f3
@ -949,6 +949,6 @@ module.exports = {
|
|||||||
createSecurePair:
|
createSecurePair:
|
||||||
internalUtil.deprecate(createSecurePair,
|
internalUtil.deprecate(createSecurePair,
|
||||||
'tls.createSecurePair() is deprecated. Please use ' +
|
'tls.createSecurePair() is deprecated. Please use ' +
|
||||||
'tls.Socket instead.', 'DEP0064'),
|
'tls.TLSSocket instead.', 'DEP0064'),
|
||||||
pipe
|
pipe
|
||||||
};
|
};
|
||||||
|
@ -9,7 +9,7 @@ const tls = require('tls');
|
|||||||
|
|
||||||
common.expectWarning(
|
common.expectWarning(
|
||||||
'DeprecationWarning',
|
'DeprecationWarning',
|
||||||
'tls.createSecurePair() is deprecated. Please use tls.Socket instead.'
|
'tls.createSecurePair() is deprecated. Please use tls.TLSSocket instead.'
|
||||||
);
|
);
|
||||||
|
|
||||||
assert.doesNotThrow(() => tls.createSecurePair());
|
assert.doesNotThrow(() => tls.createSecurePair());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user