Skip to content

Commit ba7b35c

Browse files
Filling out other required args for FetchLike invocation
1 parent 349e23f commit ba7b35c

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

client/src/lib/hooks/__tests__/useConnection.test.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,16 @@ describe("useConnection", () => {
327327
// Verify the fetch function includes the proxy auth header
328328
const mockFetch = mockSSETransport.options?.eventSourceInit?.fetch;
329329
const testUrl = "http://test.com";
330-
await mockFetch?.(testUrl);
330+
await mockFetch?.(testUrl, {
331+
headers: {
332+
"Accept": "text/event-stream",
333+
},
334+
cache: "no-store",
335+
mode: "cors",
336+
signal: new AbortController().signal,
337+
redirect: "follow",
338+
credentials: "include",
339+
});
331340

332341
expect(global.fetch).toHaveBeenCalledTimes(2);
333342
expect(

0 commit comments

Comments
 (0)