* In sse.test.ts

- More specific expectations in test "uses custom fetch implementation from options"

* In sse.ts
  - Import FetchLike from transport.ts

* In steramableHttp.ts
  - Import FetchLike from transport.ts
  - Export StartSSEOptions interface for testing

* In streamableHttp.test.ts
  - import StartSSEOptions from streamableHttp.ts
  - use StartSSEOptions instead of any in test "uses custom fetch implementation"

* In transport.ts
  - Add FetchLike function type
This commit is contained in:
cliffhall 2025-07-01 14:00:56 -04:00
commit f383a9cb8c

View file

@ -289,7 +289,9 @@ describe("SSEClientTransport", () => {
await transport.send(message);
expect(fetchWithAuth).toHaveBeenCalled();
expect(fetchWithAuth).toHaveBeenCalledTimes(2);
expect(lastServerRequest.method).toBe("POST");
expect(lastServerRequest.headers.authorization).toBe(authToken);
});
it("passes custom headers to fetch requests", async () => {