Files
Moltbot/src/memory/test-runtime-mocks.ts
2026-02-16 14:59:30 +00:00

14 lines
425 B
TypeScript

import { vi } from "vitest";
// Unit tests: avoid importing the real chokidar implementation (native fsevents, etc.).
vi.mock("chokidar", () => ({
default: {
watch: () => ({ on: () => {}, close: async () => {} }),
},
watch: () => ({ on: () => {}, close: async () => {} }),
}));
vi.mock("./sqlite-vec.js", () => ({
loadSqliteVecExtension: async () => ({ ok: false, error: "sqlite-vec disabled in tests" }),
}));