Fixes for remaining issues
This commit is contained in:
parent
8f1ed7588d
commit
a066873e37
1 changed files with 415 additions and 43 deletions
|
|
@ -267,6 +267,18 @@ describe("RemoteSession", () => {
|
|||
vi.useRealTimers();
|
||||
});
|
||||
|
||||
it("cancelRequestWait clears the timeout for a pending wait", async () => {
|
||||
vi.useFakeTimers();
|
||||
const session = new RemoteSession("s-cancel");
|
||||
const wait = session.waitForRequestResponse(42, 5000);
|
||||
const rejection = expect(wait).rejects.toThrow(/cancelled/);
|
||||
session.cancelRequestWait(42);
|
||||
await rejection;
|
||||
expect(vi.getTimerCount()).toBe(0);
|
||||
await vi.advanceTimersByTimeAsync(5000);
|
||||
vi.useRealTimers();
|
||||
});
|
||||
|
||||
it("setAuthState updates the session auth provider", async () => {
|
||||
const { createRemoteAuthProvider } =
|
||||
await import("@inspector/core/mcp/remote/node/tokenAuthProvider.js");
|
||||
|
|
|
|||
Loading…
Reference in a new issue