mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-13 14:30:35 +00:00
fix(cron): enable completion direct send for text-only announce delivery (#29151)
This commit is contained in:
committed by
GitHub
parent
fe9a7c4082
commit
3096837238
@@ -1,5 +1,5 @@
|
||||
import "./isolated-agent.mocks.js";
|
||||
import { beforeEach, describe, expect, it } from "vitest";
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { runSubagentAnnounceFlow } from "../agents/subagent-announce.js";
|
||||
import {
|
||||
createCliDeps,
|
||||
@@ -56,6 +56,10 @@ describe("runCronIsolatedAgentTurn forum topic delivery", () => {
|
||||
|
||||
expect(res.status).toBe("ok");
|
||||
expect(runSubagentAnnounceFlow).toHaveBeenCalledTimes(1);
|
||||
const announceArgs = vi.mocked(runSubagentAnnounceFlow).mock.calls[0]?.[0] as
|
||||
| { expectsCompletionMessage?: boolean }
|
||||
| undefined;
|
||||
expect(announceArgs?.expectsCompletionMessage).toBe(true);
|
||||
expect(deps.sendMessageTelegram).not.toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user