perf(test): speed up line, models list, and memory batch

This commit is contained in:
Peter Steinberger
2026-02-14 15:20:35 +00:00
parent 9fb48f4dff
commit 684c18458a
6 changed files with 126 additions and 97 deletions

View File

@@ -7,6 +7,10 @@ import { getMemorySearchManager, type MemoryIndexManager } from "./index.js";
const embedBatch = vi.fn(async (texts: string[]) => texts.map(() => [0, 1, 0]));
const embedQuery = vi.fn(async () => [0, 1, 0]);
vi.mock("./sqlite-vec.js", () => ({
loadSqliteVecExtension: async () => ({ ok: false, error: "sqlite-vec disabled in tests" }),
}));
vi.mock("./embeddings.js", () => ({
createEmbeddingProvider: async () => ({
requestedProvider: "openai",