mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-13 23:56:07 +00:00
test: verify ACP error guidance
This commit is contained in:
@@ -7,13 +7,15 @@ describe("formatAcpRuntimeErrorText", () => {
|
||||
const text = formatAcpRuntimeErrorText(
|
||||
new AcpRuntimeError("ACP_BACKEND_MISSING", "backend missing"),
|
||||
);
|
||||
expect(text).toContain("ACP error (ACP_BACKEND_MISSING): backend missing");
|
||||
expect(text).toContain("next:");
|
||||
expect(text).toBe(
|
||||
"ACP error (ACP_BACKEND_MISSING): backend missing\nnext: Run `/acp doctor`, install/enable the backend plugin, then retry.",
|
||||
);
|
||||
});
|
||||
|
||||
it("returns consistent ACP error envelope for runtime failures", () => {
|
||||
const text = formatAcpRuntimeErrorText(new AcpRuntimeError("ACP_TURN_FAILED", "turn failed"));
|
||||
expect(text).toContain("ACP error (ACP_TURN_FAILED): turn failed");
|
||||
expect(text).toContain("next:");
|
||||
expect(text).toBe(
|
||||
"ACP error (ACP_TURN_FAILED): turn failed\nnext: Retry, or use `/acp cancel` and send the message again.",
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user