summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rw-r--r--cli/tests/unit/flash_test.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/cli/tests/unit/flash_test.ts b/cli/tests/unit/flash_test.ts
index 4df225cbd..fdad1e3ae 100644
--- a/cli/tests/unit/flash_test.ts
+++ b/cli/tests/unit/flash_test.ts
@@ -36,6 +36,18 @@ function onListen<T>(
};
}
+Deno.test(async function httpServerInvalidHostname() {
+ assertThrows(
+ () =>
+ Deno.serve({
+ fetch: (_req) => new Response("ok"),
+ hostname: "localhost",
+ }),
+ TypeError,
+ "hostname could not be parsed as an IP address",
+ );
+});
+
Deno.test({ permissions: { net: true } }, async function httpServerBasic() {
const ac = new AbortController();
const promise = deferred();