mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 10:51:23 +00:00
chore: Fix types in tests 38/N.
This commit is contained in:
@@ -36,11 +36,10 @@ describe("GatewayClient", () => {
|
||||
wsMockState.last = null;
|
||||
const client = new GatewayClient({ url: "ws://127.0.0.1:1" });
|
||||
client.start();
|
||||
const last = wsMockState.last as { url: unknown; opts: unknown } | null;
|
||||
|
||||
expect(wsMockState.last?.url).toBe("ws://127.0.0.1:1");
|
||||
expect(wsMockState.last?.opts).toEqual(
|
||||
expect.objectContaining({ maxPayload: 25 * 1024 * 1024 }),
|
||||
);
|
||||
expect(last?.url).toBe("ws://127.0.0.1:1");
|
||||
expect(last?.opts).toEqual(expect.objectContaining({ maxPayload: 25 * 1024 * 1024 }));
|
||||
});
|
||||
});
|
||||
|
||||
@@ -153,7 +152,8 @@ describe("late-arriving invoke results", () => {
|
||||
context,
|
||||
});
|
||||
|
||||
const [ok, payload, error] = respond.mock.lastCall ?? [];
|
||||
const [ok, rawPayload, error] = respond.mock.lastCall ?? [];
|
||||
const payload = rawPayload as { ok?: boolean; ignored?: boolean } | undefined;
|
||||
|
||||
// Late-arriving results return success instead of error to reduce log noise.
|
||||
expect(ok).toBe(true);
|
||||
|
||||
Reference in New Issue
Block a user