From 40b083c540b90766ea746fc869bf8ea9634eaf06 Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Sat, 26 Jun 2021 00:01:25 +0200 Subject: fix: specify AbortSignal for native http requests (#11126) --- cli/tests/unit/http_test.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cli/tests') diff --git a/cli/tests/unit/http_test.ts b/cli/tests/unit/http_test.ts index 06ea1336a..c94e8bef1 100644 --- a/cli/tests/unit/http_test.ts +++ b/cli/tests/unit/http_test.ts @@ -56,9 +56,12 @@ unitTest({ perms: { net: true } }, async function httpServerBasic() { const resp = await fetch("http://127.0.0.1:4501/", { headers: { "connection": "close" }, }); + const clone = resp.clone(); const text = await resp.text(); assertEquals(text, "Hello World"); assertEquals(resp.headers.get("foo"), "bar"); + const cloneText = await clone.text(); + assertEquals(cloneText, "Hello World"); await promise; }); -- cgit v1.2.3