fix: cast AgentModelConfig in tests to resolve TS2339 on .primary

This commit is contained in:
GodsBoy 2026-03-07 07:29:40 +02:00
parent c632308dcc
commit f90b98a02c
1 changed files with 6 additions and 2 deletions

View File

@ -262,7 +262,9 @@ describe("onboard-memory", () => {
const result = await setupMemoryOptimization(cfg, runtime, prompter); const result = await setupMemoryOptimization(cfg, runtime, prompter);
expect(result.agents?.defaults?.workspace).toBe("/existing-workspace"); expect(result.agents?.defaults?.workspace).toBe("/existing-workspace");
expect(result.agents?.defaults?.model?.primary).toBe("anthropic/claude-opus-4-5"); expect((result.agents?.defaults?.model as { primary?: string })?.primary).toBe(
"anthropic/claude-opus-4-5",
);
expect(result.gateway?.mode).toBe("local"); expect(result.gateway?.mode).toBe("local");
expect(result.gateway?.port).toBe(3000); expect(result.gateway?.port).toBe(3000);
// And the new config should still be applied // And the new config should still be applied
@ -428,7 +430,9 @@ describe("onboard-memory", () => {
const result = applyNonInteractiveMemoryDefaults(cfg); const result = applyNonInteractiveMemoryDefaults(cfg);
expect(result.agents?.defaults?.workspace).toBe("/existing"); expect(result.agents?.defaults?.workspace).toBe("/existing");
expect(result.agents?.defaults?.model?.primary).toBe("openai/gpt-4o"); expect((result.agents?.defaults?.model as { primary?: string })?.primary).toBe(
"openai/gpt-4o",
);
expect(result.gateway?.port).toBe(4000); expect(result.gateway?.port).toBe(4000);
}); });
}); });