summaryrefslogtreecommitdiff
path: root/std/examples/tests
diff options
context:
space:
mode:
Diffstat (limited to 'std/examples/tests')
-rw-r--r--std/examples/tests/curl_test.ts8
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;
}
}
});