

























@@ -29,6 +29,14 @@ const baseCfg = {
2929},
3030} as OpenClawConfig;
313132+function requireFirstStringArg(mock: ReturnType<typeof vi.fn>, label: string): string {
33+const [call] = mock.mock.calls;
34+if (!call || typeof call[0] !== "string") {
35+throw new Error(`expected ${label}`);
36+}
37+return call[0];
38+}
39+3240describe("slackSetupWizard.finalize", () => {
3341it("prompts to enable interactive replies for newly configured Slack accounts", async () => {
3442const confirm = vi.fn(async () => true);
@@ -101,8 +109,7 @@ describe("slackSetupWizard.prepare", () => {
101109102110expect(plain).toHaveBeenCalledTimes(1);
103111expect(note).not.toHaveBeenCalled();
104-const manifest = plain.mock.calls[0]?.[0];
105-expect(typeof manifest).toBe("string");
112+const manifest = requireFirstStringArg(plain, "Slack manifest plain text");
106113expect(JSON.parse(manifest)).toEqual({
107114display_information: {
108115name: "OpenClaw",
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。