mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-15 13:30:48 +00:00
test: clarify proxy capture assertions
This commit is contained in:
@@ -8,7 +8,8 @@ describe("debug proxy coverage report", () => {
|
||||
expect(report.summary.total).toBe(report.entries.length);
|
||||
expect(report.summary.captured).toBeGreaterThan(0);
|
||||
expect(report.summary.proxyOnly).toBeGreaterThan(0);
|
||||
expect(report.entries.some((entry) => entry.id === "provider-transport-fetch")).toBe(true);
|
||||
expect(report.entries.some((entry) => entry.id === "feishu-client-http")).toBe(true);
|
||||
expect(report.entries.map((entry) => entry.id)).toEqual(
|
||||
expect.arrayContaining(["provider-transport-fetch", "feishu-client-http"]),
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -73,9 +73,8 @@ describe("debug proxy runtime", () => {
|
||||
finalizeDebugProxyCapture(settings, deps);
|
||||
|
||||
const sessionEvents = events.filter((event) => event.sessionId === "runtime-test-session");
|
||||
expect(sessionEvents.some((event) => event.host === "api.minimax.io")).toBe(true);
|
||||
expect(sessionEvents.some((event) => event.kind === "request")).toBe(true);
|
||||
expect(sessionEvents.some((event) => event.kind === "response")).toBe(true);
|
||||
expect(sessionEvents.map((event) => event.host)).toContain("api.minimax.io");
|
||||
expect(sessionEvents.map((event) => event.kind)).toEqual(["request", "response"]);
|
||||
});
|
||||
|
||||
it("normalizes symbol-bearing request headers before calling patched fetch targets", async () => {
|
||||
|
||||
Reference in New Issue
Block a user