summaryrefslogtreecommitdiff
path: root/cli/tests/unit/tls_test.ts
diff options
context:
space:
mode:
authorBert Belder <bertbelder@gmail.com>2021-04-26 19:39:55 +0000
committerBert Belder <bertbelder@gmail.com>2021-04-26 23:40:45 +0200
commit299518d9357ca81efa12f295f65086708f392531 (patch)
tree14817be22e60bf143f9d4108f5813dc985ec3ac5 /cli/tests/unit/tls_test.ts
parent87c055b371e6388f73c88ad26f56bca67f6691f4 (diff)
fix(tls): throw meaningful error when hostname is invalid (#10387)
`InvalidDNSNameError` is thrown when a string is not a valid hostname, e.g. it contains invalid characters, or starts with a numeric digit. It does not involve a (failed) DNS lookup.
Diffstat (limited to 'cli/tests/unit/tls_test.ts')
-rw-r--r--cli/tests/unit/tls_test.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/cli/tests/unit/tls_test.ts b/cli/tests/unit/tls_test.ts
index fa869037e..0528c8043 100644
--- a/cli/tests/unit/tls_test.ts
+++ b/cli/tests/unit/tls_test.ts
@@ -32,7 +32,7 @@ unitTest(
await assertThrowsAsync(async () => {
await Deno.connectTls({ hostname: "127.0.0.1", port: 3567 });
- }, Error);
+ }, TypeError);
listener.close();
},