From 5514330406f597f7bd330bf9c219815b0d187569 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Sat, 9 Dec 2017 05:41:22 +0100 Subject: [PATCH] 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 Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig Reviewed-By: Jon Moss Reviewed-By: Timothy Gu Reviewed-By: Anatoli Papirovski Reviewed-By: Ruben Bridgewater --- lib/_tls_legacy.js | 2 +- test/parallel/test-tls-legacy-deprecated.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/_tls_legacy.js b/lib/_tls_legacy.js index 07b95546b3307a..d65da58e8cf2e9 100644 --- a/lib/_tls_legacy.js +++ b/lib/_tls_legacy.js @@ -949,6 +949,6 @@ module.exports = { createSecurePair: internalUtil.deprecate(createSecurePair, 'tls.createSecurePair() is deprecated. Please use ' + - 'tls.Socket instead.', 'DEP0064'), + 'tls.TLSSocket instead.', 'DEP0064'), pipe }; diff --git a/test/parallel/test-tls-legacy-deprecated.js b/test/parallel/test-tls-legacy-deprecated.js index 4a6120c71b1f77..3b1919010e40e6 100644 --- a/test/parallel/test-tls-legacy-deprecated.js +++ b/test/parallel/test-tls-legacy-deprecated.js @@ -9,7 +9,7 @@ const tls = require('tls'); common.expectWarning( 'DeprecationWarning', - 'tls.createSecurePair() is deprecated. Please use tls.Socket instead.' + 'tls.createSecurePair() is deprecated. Please use tls.TLSSocket instead.' ); assert.doesNotThrow(() => tls.createSecurePair());