diff options
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(); +}); |