aboutsummaryrefslogtreecommitdiff
path: root/test/js
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-05-10 16:55:13 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-05-10 16:55:13 -0700
commit96dc0471ff8f830327ca89d6cbcdbd320b379b15 (patch)
treeb5ca7da53057baba39b9522c314b4b1f1cda5382 /test/js
parent85b4be5f7189e51e63672ddc874e7c6e09ae8bef (diff)
downloadbun-96dc0471ff8f830327ca89d6cbcdbd320b379b15.tar.gz
bun-96dc0471ff8f830327ca89d6cbcdbd320b379b15.tar.zst
bun-96dc0471ff8f830327ca89d6cbcdbd320b379b15.zip
Clean-up 85b4be5f7189e51e63672ddc874e7c6e09ae8bef
- We don't need to make `Bun__fetch` exported in every C++ header file - We shouldn't return JSObjectRef, its an unnecessary wrapper - The version of `fetch` on the Bun global should be non-configurable so that it is safe for anyone who wants to use that without a user-modifiable one
Diffstat (limited to 'test/js')
-rw-r--r--test/js/web/fetch/fetch.test.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/js/web/fetch/fetch.test.ts b/test/js/web/fetch/fetch.test.ts
index 6e07db40b..9419629d1 100644
--- a/test/js/web/fetch/fetch.test.ts
+++ b/test/js/web/fetch/fetch.test.ts
@@ -1134,3 +1134,13 @@ it("#2794", () => {
expect(typeof globalThis.fetch.bind).toBe("function");
expect(typeof Bun.fetch.bind).toBe("function");
});
+
+it("invalid header doesnt crash", () => {
+ expect(() =>
+ fetch("http://example.com", {
+ headers: {
+ ["lol!!!!!" + "emoji" + "😀"]: "hello",
+ },
+ }),
+ ).toThrow();
+});