test: fix assertion type checks · openclaw/openclaw@00cf49d
steipete
·
2026-05-11
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -12,7 +12,9 @@ const {
|
12 | 12 | } = vi.hoisted(() => ({ |
13 | 13 | assertOkOrThrowHttpErrorMock: vi.fn(async () => {}), |
14 | 14 | postJsonRequestMock: vi.fn(), |
15 | | -resolveApiKeyForProviderMock: vi.fn(async () => ({ apiKey: "openrouter-key" })), |
| 15 | +resolveApiKeyForProviderMock: vi.fn(async (_params: unknown) => ({ |
| 16 | +apiKey: "openrouter-key", |
| 17 | +})), |
16 | 18 | resolveProviderHttpRequestConfigMock: vi.fn((params: Record<string, unknown>) => ({ |
17 | 19 | baseUrl: params.baseUrl ?? params.defaultBaseUrl ?? "https://openrouter.ai/api/v1", |
18 | 20 | allowPrivateNetwork: false, |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -103,7 +103,7 @@ describe("slackSetupWizard.prepare", () => {
|
103 | 103 | expect(note).not.toHaveBeenCalled(); |
104 | 104 | const manifest = plain.mock.calls[0]?.[0]; |
105 | 105 | expect(typeof manifest).toBe("string"); |
106 | | -expect(JSON.parse(String(manifest))).toEqual({ |
| 106 | +expect(JSON.parse(manifest)).toEqual({ |
107 | 107 | display_information: { |
108 | 108 | name: "OpenClaw", |
109 | 109 | description: "OpenClaw connector for OpenClaw", |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -17,6 +17,9 @@ describe("zca-client runtime loading", () => {
|
17 | 17 | const client = await zcaClient.createZalo({ logging: false, selfListen: true }); |
18 | 18 | |
19 | 19 | expect(runtimeFactory).toHaveBeenCalledTimes(1); |
20 | | -expect(client.options).toEqual({ logging: false, selfListen: true }); |
| 20 | +expect((client as { options?: { logging?: boolean; selfListen?: boolean } }).options).toEqual({ |
| 21 | +logging: false, |
| 22 | +selfListen: true, |
| 23 | +}); |
21 | 24 | }); |
22 | 25 | }); |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。