fix(test): align trigger harness config types

This commit is contained in:
Peter Steinberger
2026-02-15 00:10:12 +00:00
parent 516cbf4366
commit a11aecc3c1

View File

@@ -1,5 +1,6 @@
import { join } from "node:path";
import { afterEach, expect, vi } from "vitest";
import type { OpenClawConfig } from "../config/config.js";
import { withTempHome as withTempHomeBase } from "../../test/helpers/temp-home.js";
// Avoid exporting vitest mock types (TS2742 under pnpm + d.ts emit).
@@ -116,11 +117,11 @@ export async function withTempHome<T>(fn: (home: string) => Promise<T>): Promise
);
}
export function makeCfg(home: string) {
export function makeCfg(home: string): OpenClawConfig {
return {
agents: {
defaults: {
model: "anthropic/claude-opus-4-5",
model: { primary: "anthropic/claude-opus-4-5" },
workspace: join(home, "openclaw"),
},
},
@@ -130,7 +131,7 @@ export function makeCfg(home: string) {
},
},
session: { store: join(home, "sessions.json") },
};
} as OpenClawConfig;
}
export async function runGreetingPromptForBareNewOrReset(params: {