diff options
author | uki00a <uki00a@gmail.com> | 2020-03-23 03:41:42 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-22 14:41:42 -0400 |
commit | 07ea145ec4d1defe4481035432bb63234560ba8d (patch) | |
tree | b9c1c34425f9d035a2d7c60706c137619c8a33a4 /std/examples | |
parent | 12ff78ed4cdf05a27348079c5af259ab2492423e (diff) |
re-enable a test (#4461)
Diffstat (limited to 'std/examples')
-rw-r--r-- | std/examples/tests/curl_test.ts | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/std/examples/tests/curl_test.ts b/std/examples/tests/curl_test.ts index a36da83ba..3e3d4f78a 100644 --- a/std/examples/tests/curl_test.ts +++ b/std/examples/tests/curl_test.ts @@ -6,12 +6,9 @@ import { randomPort } from "../../http/test_util.ts"; const port = randomPort(); Deno.test({ name: "[examples/curl] send a request to a specified url", - // FIXME(bartlomieju): this test is leaking both resources and ops, - // and causes interference with other tests - ignore: true, fn: async () => { const server = serve({ port }); - (async (): Promise<void> => { + const serverPromise = (async (): Promise<void> => { for await (const req of server) { req.respond({ body: "Hello world" }); } @@ -36,8 +33,9 @@ Deno.test({ assertStrictEq(actual, expected); } finally { - process.close(); server.close(); + process.close(); + await serverPromise; } } }); |