Skip to content

Commit

Permalink
Update test/parallel/test-tls-basic-validations.js
Browse files Browse the repository at this point in the history
Co-authored-by: Tobias Nießen <tniessen@tnie.de>
  • Loading branch information
deokjinkim and tniessen authored Sep 27, 2023
1 parent d5d2fa3 commit 9ca4271
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/parallel/test-tls-basic-validations.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,11 @@ assert.throws(() => { tls.createSecureContext({ maxVersion: 'fhqwhgads' }); },
name: 'TypeError'
});

[undefined, null, 1, true].forEach((value) => {
for (const checkServerIdentity of [undefined, null, 1, true]) {
assert.throws(() => {
tls.connect({ checkServerIdentity: value });
tls.connect({ checkServerIdentity });
}, {
code: 'ERR_INVALID_ARG_TYPE',
name: 'TypeError',
});
});
}

0 comments on commit 9ca4271

Please sign in to comment.