deno
deno copied to clipboard
serve_test: test fails with weird error message if you have a server listening on :8000 already
ERRORS
./cli/tests/unit/serve_test.ts (uncaught error)
error: (in promise) TypeError: error sending request for url (http://localhost:8000/): connection closed before message completed
const res1 = await fetch(`http://localhost:${port}/`);
^
at async mainFetch (ext:deno_fetch/26_fetch.js:266:12)
at async fetch (ext:deno_fetch/26_fetch.js:490:7)
at async onListen (file:///Users/lkurusa/src/denoland/deno/cli/tests/unit/serve_test.ts:2549:22)
This error was not caught from a test and caused the test runner to fail on the referenced module.
It most likely originated from a dangling promise, event/timeout handler or top-level code.