test(mcp): stabilize lazy-loading verification

This commit is contained in:
morluto
2026-07-26 15:26:41 +00:00
parent fecddc0549
commit 7157ab0b70
5 changed files with 130 additions and 21 deletions
+1 -1
View File
@@ -105,7 +105,7 @@ describe("process-capture MCP elicitation", () => {
await Promise.allSettled([client.close(), server.close()]);
await rm(root, { recursive: true, force: true });
}
});
}, 20_000);
it.each(["tampered", "expired"] as const)(
"rejects %s signed state through the modern MCP client and server",
+4 -2
View File
@@ -87,7 +87,9 @@ describe("target-free MCP lifecycle", () => {
expect(closed).toEqual([canonicalTargetPath]);
expect(
z
.object({ result: z.object({ path: z.string(), sha256: z.string() }) })
.object({
result: z.object({ path: z.string(), sha256: z.string() }),
})
.parse(
structured(
await mcp.callTool({
@@ -100,7 +102,7 @@ describe("target-free MCP lifecycle", () => {
path: canonicalTargetPath,
sha256: z.object({ sha256: z.string() }).parse(second).sha256,
});
});
}, 10_000);
it("reports no-target, opens, analyzes, switches, reports status, and closes", async () => {
directory = await createTestTempDirectory("rea-mcp-session-");