summaryrefslogtreecommitdiff
path: root/test/parallel/test-https-options-boolean-check.js
diff options
context:
space:
mode:
authorAnatoli Papirovski <apapirovski@mac.com>2017-12-08 16:41:38 -0500
committerAnatoli Papirovski <apapirovski@mac.com>2017-12-11 18:21:58 -0500
commit094bfaf769f5b6bc8ca6fbcc289cdf5e0f07073f (patch)
tree5fa840b303201b1f5375302bbf06cedc42f5a5c0 /test/parallel/test-https-options-boolean-check.js
parent4df7c190bf449e3d0d8877f45bb7490d7a801118 (diff)
downloadandroid-node-v8-094bfaf769f5b6bc8ca6fbcc289cdf5e0f07073f.tar.gz
android-node-v8-094bfaf769f5b6bc8ca6fbcc289cdf5e0f07073f.tar.bz2
android-node-v8-094bfaf769f5b6bc8ca6fbcc289cdf5e0f07073f.zip
test: replace assert.throws w/ common.expectsError
PR-URL: https://github.com/nodejs/node/pull/17557 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'test/parallel/test-https-options-boolean-check.js')
-rw-r--r--test/parallel/test-https-options-boolean-check.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/parallel/test-https-options-boolean-check.js b/test/parallel/test-https-options-boolean-check.js
index eae319988e..ed124d43fb 100644
--- a/test/parallel/test-https-options-boolean-check.js
+++ b/test/parallel/test-https-options-boolean-check.js
@@ -101,16 +101,16 @@ const invalidCertRE = /^The "cert" argument must be one of type string, Buffer,
[[keyStr, keyStr2], true, invalidCertRE],
[true, [certBuff, certBuff2], invalidKeyRE]
].map((params) => {
- assert.throws(() => {
+ common.expectsError(() => {
https.createServer({
key: params[0],
cert: params[1]
});
- }, common.expectsError({
+ }, {
code: 'ERR_INVALID_ARG_TYPE',
type: TypeError,
message: params[2]
- }));
+ });
});
// Checks to ensure https.createServer works with the CA parameter
@@ -142,15 +142,15 @@ const invalidCertRE = /^The "cert" argument must be one of type string, Buffer,
[keyBuff, certBuff, true],
[keyBuff, certBuff, [caCert, true]]
].map((params) => {
- assert.throws(() => {
+ common.expectsError(() => {
https.createServer({
key: params[0],
cert: params[1],
ca: params[2]
});
- }, common.expectsError({
+ }, {
code: 'ERR_INVALID_ARG_TYPE',
type: TypeError,
message: /^The "ca" argument must be one of type string, Buffer, TypedArray, or DataView$/
- }));
+ });
});