fix(test): align main channel assumptions · openclaw/openclaw@2597723
vincentkoc
·
2026-05-08
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -2760,13 +2760,14 @@ describe("openai transport stream", () => {
|
2760 | 2760 | api: "openai-completions", |
2761 | 2761 | provider: "fireworks", |
2762 | 2762 | baseUrl: "https://api.fireworks.ai/inference/v1", |
| 2763 | +reasoning: false, |
2763 | 2764 | input: ["text"], |
2764 | 2765 | cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, |
2765 | 2766 | contextWindow: 256000, |
2766 | 2767 | maxTokens: 256000, |
2767 | 2768 | compat: { |
2768 | 2769 | unsupportedToolSchemaKeywords: ["not"], |
2769 | | -}, |
| 2770 | +} as never, |
2770 | 2771 | } satisfies Model<"openai-completions">, |
2771 | 2772 | { |
2772 | 2773 | systemPrompt: "system", |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -57,7 +57,7 @@ describe("createOpenAICompletionsToolsCompatWrapper", () => {
|
57 | 57 | id: "chat-only-model", |
58 | 58 | baseUrl: "https://example.invalid/v1", |
59 | 59 | compat: { supportsTools: false }, |
60 | | -} as Model<"openai-completions">, |
| 60 | +} as unknown as Model<"openai-completions">, |
61 | 61 | { messages: [] }, |
62 | 62 | {}, |
63 | 63 | ); |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -460,10 +460,10 @@ describe("config io write prepare", () => {
|
460 | 460 | channels: { |
461 | 461 | imessage: { |
462 | 462 | cliPath: "/usr/local/bin/imsg", |
463 | | -runtimeOnlyDefault: true, |
464 | 463 | }, |
465 | 464 | }, |
466 | 465 | } satisfies OpenClawConfig; |
| 466 | +(runtimeConfig.channels?.imessage as Record<string, unknown>).runtimeOnlyDefault = true; |
467 | 467 | |
468 | 468 | const nextConfig: OpenClawConfig = structuredClone(runtimeConfig); |
469 | 469 | nextConfig.gateway = { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -170,7 +170,7 @@ describe("resolveCronDeliveryPlan", () => {
|
170 | 170 | } |
171 | 171 | }); |
172 | 172 | |
173 | | -it("does not treat channel-owned service prefixes as provider selection", () => { |
| 173 | +it("uses iMessage target prefixes as provider selection", () => { |
174 | 174 | setCronDeliveryTestRegistry([ |
175 | 175 | { |
176 | 176 | pluginId: "imessage", |
@@ -189,7 +189,7 @@ describe("resolveCronDeliveryPlan", () => {
|
189 | 189 | }), |
190 | 190 | ); |
191 | 191 | expect(plan.mode).toBe("announce"); |
192 | | -expect(plan.channel).toBe("last"); |
| 192 | +expect(plan.channel).toBe("imessage"); |
193 | 193 | expect(plan.to).toBe("imessage:+15551234567"); |
194 | 194 | }); |
195 | 195 | }); |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -134,8 +134,8 @@ describe("resolveChannelSetupSelectionContributions", () => {
|
134 | 134 | }); |
135 | 135 | |
136 | 136 | expect(contributions.map((contribution) => contribution.option.label)).toEqual([ |
137 | | -"iMessage (macOS app)", |
138 | 137 | "Discord (Bot API)", |
| 138 | +"iMessage (macOS app)", |
139 | 139 | "Zalo (Bot API)", |
140 | 140 | ]); |
141 | 141 | }); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。