summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rw-r--r--cli/tests/unit/fetch_test.ts15
1 files changed, 15 insertions, 0 deletions
diff --git a/cli/tests/unit/fetch_test.ts b/cli/tests/unit/fetch_test.ts
index a46104ff8..e046e9c03 100644
--- a/cli/tests/unit/fetch_test.ts
+++ b/cli/tests/unit/fetch_test.ts
@@ -449,6 +449,21 @@ unitTest(
unitTest(
{ perms: { net: true } },
+ async function fetchSeparateInit(): Promise<void> {
+ // related to: https://github.com/denoland/deno/issues/10396
+ const req = new Request("http://localhost:4545/cli/tests/001_hello.js");
+ const init = {
+ method: "GET",
+ };
+ req.headers.set("foo", "bar");
+ const res = await fetch(req, init);
+ assertEquals(res.status, 200);
+ await res.text();
+ },
+);
+
+unitTest(
+ { perms: { net: true } },
async function fetchInitTypedArrayBody(): Promise<void> {
const data = "Hello World";
const response = await fetch("http://localhost:4545/echo_server", {