aboutsummaryrefslogtreecommitdiff
path: root/integration/bunjs-only-snippets/fetch.test.js
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2022-03-23 04:26:56 -0700
committerGravatar Jarred Sumner <jarred@jarredsumner.com> 2022-03-23 04:26:56 -0700
commit30bdaf80ef11cc4956a02b33112b8f180224ad41 (patch)
tree21abaa036ac3a065bd841320f972084f59bec4c7 /integration/bunjs-only-snippets/fetch.test.js
parent07d77c1e00a3c74774ab4ea8c79d5bdeb0d9be4a (diff)
downloadbun-30bdaf80ef11cc4956a02b33112b8f180224ad41.tar.gz
bun-30bdaf80ef11cc4956a02b33112b8f180224ad41.tar.zst
bun-30bdaf80ef11cc4956a02b33112b8f180224ad41.zip
:scissors: test
Diffstat (limited to '')
-rw-r--r--integration/bunjs-only-snippets/fetch.test.js16
1 files changed, 2 insertions, 14 deletions
diff --git a/integration/bunjs-only-snippets/fetch.test.js b/integration/bunjs-only-snippets/fetch.test.js
index 018527287..76cd5123b 100644
--- a/integration/bunjs-only-snippets/fetch.test.js
+++ b/integration/bunjs-only-snippets/fetch.test.js
@@ -293,17 +293,7 @@ describe("Response", () => {
);
expect(response.status).toBe(407);
});
- it("overrides the content-type header", () => {
- var response = Response.json("hello", {
- headers: {
- "content-type": "potato",
- },
- });
- expect(response.type).toBe("basic");
- expect(response.headers.get("content-type")).toBe(
- "application/json;charset=utf-8"
- );
- });
+
it("supports headers", () => {
var response = Response.json("hello", {
headers: {
@@ -312,9 +302,7 @@ describe("Response", () => {
},
status: 408,
});
- expect(response.headers.get("content-type")).toBe(
- "application/json;charset=utf-8"
- );
+
expect(response.headers.get("x-hello")).toBe("world");
expect(response.status).toBe(408);
});