From 72ea3eedc9fb98c0664b1720ddc685aad4ddc89f Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Sat, 31 Jan 2026 07:30:48 +0100 Subject: [PATCH] Tests: inline mock classes in vi.mock factory --- src/commands/models.list.test.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/commands/models.list.test.ts b/src/commands/models.list.test.ts index 7343f0c583..199ef6402d 100644 --- a/src/commands/models.list.test.ts +++ b/src/commands/models.list.test.ts @@ -47,8 +47,15 @@ vi.mock("../agents/model-auth.js", () => ({ })); vi.mock("@mariozechner/pi-coding-agent", () => ({ - AuthStorage, - ModelRegistry, + AuthStorage: class {}, + ModelRegistry: class { + getAll() { + return modelRegistryState.models; + } + getAvailable() { + return modelRegistryState.available; + } + }, })); function makeRuntime() {