mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 22:20:43 +00:00
test: tighten gateway helper assertions
This commit is contained in:
@@ -963,7 +963,7 @@ describe("callGateway error details", () => {
|
||||
});
|
||||
expect(eventLoopReadyState.calls).toHaveLength(1);
|
||||
expect(eventLoopReadyState.calls[0]?.maxWaitMs).toBe(5);
|
||||
expect(lastClientOptions).not.toBeNull();
|
||||
expect(lastClientOptions?.url).toBe("ws://127.0.0.1:18789");
|
||||
expect(startCalls).toBe(0);
|
||||
});
|
||||
|
||||
|
||||
@@ -88,10 +88,10 @@ describe("gateway cli backend live helpers", () => {
|
||||
token: "gateway-token",
|
||||
});
|
||||
|
||||
expect(typeof client).toBe("object");
|
||||
expect(client).not.toBeNull();
|
||||
expect(typeof (client as { start?: unknown }).start).toBe("function");
|
||||
expect(typeof (client as { stopAndWait?: unknown }).stopAndWait).toBe("function");
|
||||
expect(client).toMatchObject({
|
||||
start: expect.any(Function),
|
||||
stopAndWait: expect.any(Function),
|
||||
});
|
||||
expect(gatewayClientState.lastOptions).toMatchObject({
|
||||
url: "ws://127.0.0.1:18789",
|
||||
token: "gateway-token",
|
||||
|
||||
@@ -2056,9 +2056,7 @@ describe("oversized transcript line guards", () => {
|
||||
512 * 1024,
|
||||
);
|
||||
|
||||
expect(usage).not.toBeNull();
|
||||
expect(usage?.modelProvider).not.toBe("oversized-provider");
|
||||
expect(usage?.modelProvider).toBe("test-provider");
|
||||
expect(usage).toMatchObject({ modelProvider: "test-provider" });
|
||||
});
|
||||
|
||||
test("readSessionTitleFieldsFromTranscriptAsync delegates to bounded sync reader", async () => {
|
||||
|
||||
Reference in New Issue
Block a user