diff options
author | 2023-05-10 16:55:13 -0700 | |
---|---|---|
committer | 2023-05-10 16:55:13 -0700 | |
commit | 96dc0471ff8f830327ca89d6cbcdbd320b379b15 (patch) | |
tree | b5ca7da53057baba39b9522c314b4b1f1cda5382 /test/js | |
parent | 85b4be5f7189e51e63672ddc874e7c6e09ae8bef (diff) | |
download | bun-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.ts | 10 |
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(); +}); |