summaryrefslogtreecommitdiff
path: root/cli/tests/unit/request_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/unit/request_test.ts')
-rw-r--r--cli/tests/unit/request_test.ts15
1 files changed, 3 insertions, 12 deletions
diff --git a/cli/tests/unit/request_test.ts b/cli/tests/unit/request_test.ts
index a8cbed370..7c4fa4ad0 100644
--- a/cli/tests/unit/request_test.ts
+++ b/cli/tests/unit/request_test.ts
@@ -15,17 +15,6 @@ unitTest(async function fromInit(): Promise<void> {
assertEquals(req.headers.get("test-header"), "value");
});
-unitTest(async function fromRequest(): Promise<void> {
- const r = new Request("http://foo/", { body: "ahoyhoy" });
- r.headers.set("test-header", "value");
-
- const req = new Request(r);
-
- assertEquals(await r.text(), await req.text());
- assertEquals(req.url, r.url);
- assertEquals(req.headers.get("test-header"), r.headers.get("test-header"));
-});
-
unitTest(function requestNonString(): void {
const nonString = {
toString() {
@@ -50,9 +39,11 @@ unitTest(function requestRelativeUrl(): void {
unitTest(async function cloneRequestBodyStream(): Promise<void> {
// hack to get a stream
- const stream = new Request("http://foo/", { body: "a test body" }).body;
+ const stream =
+ new Request("http://foo/", { body: "a test body", method: "POST" }).body;
const r1 = new Request("http://foo/", {
body: stream,
+ method: "POST",
});
const r2 = r1.clone();