test: reuse trigger harness defaults in custom configs

This commit is contained in:
Peter Steinberger
2026-02-22 12:41:37 +00:00
parent 2c40a20737
commit 829236afa7
3 changed files with 29 additions and 58 deletions

View File

@@ -180,21 +180,17 @@ describe("trigger handling", () => {
it("uses the target agent model for native /status", async () => {
await withTempHome(async (home) => {
const cfg = {
agents: {
defaults: {
model: "anthropic/claude-opus-4-5",
workspace: join(home, "openclaw"),
},
list: [{ id: "coding", model: "minimax/MiniMax-M2.1" }],
const cfg = makeCfg(home) as unknown as OpenClawConfig;
cfg.agents = {
...cfg.agents,
list: [{ id: "coding", model: "minimax/MiniMax-M2.1" }],
};
cfg.channels = {
...cfg.channels,
telegram: {
allowFrom: ["*"],
},
channels: {
telegram: {
allowFrom: ["*"],
},
},
session: { store: join(home, "sessions.json") },
} as unknown as OpenClawConfig;
};
const res = await getReplyFromConfig(
{