aboutsummaryrefslogtreecommitdiff
path: root/test/parallel/test-https-options-boolean-check.js
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2017-12-24 23:09:05 -0800
committerJames M Snell <jasnell@gmail.com>2017-12-28 09:05:37 -0800
commitfe8a5aa0b2f09e689ae77b2f97e2baafa5d9a31f (patch)
tree2df154d5a6068291f61fd06a251031dc64f639f3 /test/parallel/test-https-options-boolean-check.js
parent5c7af90cbf550d851eb4bfb0b8546bc48e381d46 (diff)
downloadandroid-node-v8-fe8a5aa0b2f09e689ae77b2f97e2baafa5d9a31f.tar.gz
android-node-v8-fe8a5aa0b2f09e689ae77b2f97e2baafa5d9a31f.tar.bz2
android-node-v8-fe8a5aa0b2f09e689ae77b2f97e2baafa5d9a31f.zip
test: replace map() with forEach() where appropriate
Two tests were using Array.prototype.map() without returning values in the callback. In other words, they were using it where a `.forEach()` was called for. Change to `.forEach()`. PR-URL: https://github.com/nodejs/node/pull/17858 Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'test/parallel/test-https-options-boolean-check.js')
-rw-r--r--test/parallel/test-https-options-boolean-check.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/parallel/test-https-options-boolean-check.js b/test/parallel/test-https-options-boolean-check.js
index ed124d43fb..04baf403df 100644
--- a/test/parallel/test-https-options-boolean-check.js
+++ b/test/parallel/test-https-options-boolean-check.js
@@ -64,7 +64,7 @@ const invalidCertRE = /^The "cert" argument must be one of type string, Buffer,
[false, [certStr, certStr2]],
[[{ pem: keyBuff }], false],
[[{ pem: keyBuff }, { pem: keyBuff }], false]
-].map((params) => {
+].forEach((params) => {
assert.doesNotThrow(() => {
https.createServer({
key: params[0],
@@ -100,7 +100,7 @@ const invalidCertRE = /^The "cert" argument must be one of type string, Buffer,
[[keyStr, keyStr2], [true, false], invalidCertRE],
[[keyStr, keyStr2], true, invalidCertRE],
[true, [certBuff, certBuff2], invalidKeyRE]
-].map((params) => {
+].forEach((params) => {
common.expectsError(() => {
https.createServer({
key: params[0],
@@ -123,7 +123,7 @@ const invalidCertRE = /^The "cert" argument must be one of type string, Buffer,
[keyBuff, certBuff, caArrBuff],
[keyBuff, certBuff, caArrDataView],
[keyBuff, certBuff, false],
-].map((params) => {
+].forEach((params) => {
assert.doesNotThrow(() => {
https.createServer({
key: params[0],
@@ -141,7 +141,7 @@ const invalidCertRE = /^The "cert" argument must be one of type string, Buffer,
[keyBuff, certBuff, 1],
[keyBuff, certBuff, true],
[keyBuff, certBuff, [caCert, true]]
-].map((params) => {
+].forEach((params) => {
common.expectsError(() => {
https.createServer({
key: params[0],