diff --git a/ext/node/polyfills/_tls_wrap.js b/ext/node/polyfills/_tls_wrap.js index 05075a311c2b2a..e14380317dcbc0 100644 --- a/ext/node/polyfills/_tls_wrap.js +++ b/ext/node/polyfills/_tls_wrap.js @@ -891,7 +891,7 @@ function Server(options, listener) { } else if (options == null || typeof options === "object") { options ??= kEmptyObject; } else { - throw new TypeError("options must be an object"); + throw new ERR_INVALID_ARG_TYPE("options", "object", options); } this._contexts = []; diff --git a/tests/node_compat/config.jsonc b/tests/node_compat/config.jsonc index e46f1da3a8dc72..98d77da63dc4be 100644 --- a/tests/node_compat/config.jsonc +++ b/tests/node_compat/config.jsonc @@ -3100,6 +3100,7 @@ "parallel/test-tls-net-connect-prefer-path.js": { "windows": false }, "parallel/test-tls-net-socket-keepalive-12.js": {}, "parallel/test-tls-net-socket-keepalive.js": {}, + "parallel/test-tls-no-cert-required.js": {}, "parallel/test-tls-no-sslv3.js": {}, "parallel/test-tls-on-empty-socket.js": {}, "parallel/test-tls-options-boolean-check.js": {},