summaryrefslogtreecommitdiff
path: root/test/parallel/test-tls-no-sslv23.js
diff options
context:
space:
mode:
authorSam Roberts <vieuxtech@gmail.com>2019-04-24 10:44:01 -0700
committerSam Roberts <vieuxtech@gmail.com>2019-04-26 10:38:38 -0700
commit86b4f3729ae66d8da8e86f37684de439bbe0e08a (patch)
tree98dd0fd44ee87a19f1828f36c65a14d285ec2828 /test/parallel/test-tls-no-sslv23.js
parent1d022e825356dfba9bef2d6f194b9e93d63b726d (diff)
downloadandroid-node-v8-86b4f3729ae66d8da8e86f37684de439bbe0e08a.tar.gz
android-node-v8-86b4f3729ae66d8da8e86f37684de439bbe0e08a.tar.bz2
android-node-v8-86b4f3729ae66d8da8e86f37684de439bbe0e08a.zip
tls: include invalid method name in thrown error
When an invalid TLS method name error is thrown, include the invalid name in the error message. PR-URL: https://github.com/nodejs/node/pull/27390 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test/parallel/test-tls-no-sslv23.js')
-rw-r--r--test/parallel/test-tls-no-sslv23.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/parallel/test-tls-no-sslv23.js b/test/parallel/test-tls-no-sslv23.js
index 737f42b530..f1ba670ff0 100644
--- a/test/parallel/test-tls-no-sslv23.js
+++ b/test/parallel/test-tls-no-sslv23.js
@@ -8,7 +8,10 @@ const tls = require('tls');
assert.throws(function() {
tls.createSecureContext({ secureProtocol: 'blargh' });
-}, /Unknown method/);
+}, {
+ code: 'ERR_TLS_INVALID_PROTOCOL_METHOD',
+ message: 'Unknown method: blargh',
+});
const errMessageSSLv2 = /SSLv2 methods disabled/;