mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 12:27:40 +00:00
test: dedupe auto-reply web and signal flows
This commit is contained in:
@@ -6,13 +6,15 @@ import {
|
||||
getCompactEmbeddedPiSessionMock,
|
||||
getRunEmbeddedPiAgentMock,
|
||||
installTriggerHandlingE2eTestHooks,
|
||||
loadGetReplyFromConfig,
|
||||
makeCfg,
|
||||
mockRunEmbeddedPiAgentOk,
|
||||
withTempHome,
|
||||
} from "./reply.triggers.trigger-handling.test-harness.js";
|
||||
|
||||
let getReplyFromConfig: typeof import("./reply.js").getReplyFromConfig;
|
||||
beforeAll(async () => {
|
||||
({ getReplyFromConfig } = await import("./reply.js"));
|
||||
getReplyFromConfig = await loadGetReplyFromConfig();
|
||||
});
|
||||
|
||||
installTriggerHandlingE2eTestHooks();
|
||||
@@ -92,13 +94,7 @@ describe("trigger handling", () => {
|
||||
});
|
||||
it("ignores think directives that only appear in the context wrapper", async () => {
|
||||
await withTempHome(async (home) => {
|
||||
getRunEmbeddedPiAgentMock().mockResolvedValue({
|
||||
payloads: [{ text: "ok" }],
|
||||
meta: {
|
||||
durationMs: 1,
|
||||
agentMeta: { sessionId: "s", provider: "p", model: "m" },
|
||||
},
|
||||
});
|
||||
mockRunEmbeddedPiAgentOk();
|
||||
|
||||
const res = await getReplyFromConfig(
|
||||
{
|
||||
@@ -127,13 +123,7 @@ describe("trigger handling", () => {
|
||||
});
|
||||
it("does not emit directive acks for heartbeats with /think", async () => {
|
||||
await withTempHome(async (home) => {
|
||||
getRunEmbeddedPiAgentMock().mockResolvedValue({
|
||||
payloads: [{ text: "ok" }],
|
||||
meta: {
|
||||
durationMs: 1,
|
||||
agentMeta: { sessionId: "s", provider: "p", model: "m" },
|
||||
},
|
||||
});
|
||||
mockRunEmbeddedPiAgentOk();
|
||||
|
||||
const res = await getReplyFromConfig(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user