From 85b4be5f7189e51e63672ddc874e7c6e09ae8bef Mon Sep 17 00:00:00 2001 From: Ciro Spaciari Date: Wed, 10 May 2023 20:38:52 -0300 Subject: fix(fetch) fix fetch inheritance (#2842) * patch fetch function inheritance * fmt * fix reserveCapacity and number of arguments for fetch * change Bun.fetch to use Fetch.jsFunction * merge Fetch.jsFunction and Fetch.call * remove commented code --- test/js/web/fetch/fetch.test.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/js/web/fetch/fetch.test.ts') diff --git a/test/js/web/fetch/fetch.test.ts b/test/js/web/fetch/fetch.test.ts index cc59ba3f6..6e07db40b 100644 --- a/test/js/web/fetch/fetch.test.ts +++ b/test/js/web/fetch/fetch.test.ts @@ -1129,3 +1129,8 @@ it("#874", () => { expect(new Request(new Request("https://example.com")).url).toBe("https://example.com"); expect(new Request({ url: "https://example.com" }).url).toBe("https://example.com"); }); + +it("#2794", () => { + expect(typeof globalThis.fetch.bind).toBe("function"); + expect(typeof Bun.fetch.bind).toBe("function"); +}); -- cgit v1.2.3