mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 20:28:29 +00:00
refactor(core): dedupe shared config and runtime helpers
This commit is contained in:
@@ -3,21 +3,10 @@ import os from "node:os";
|
||||
import path from "node:path";
|
||||
import { afterAll, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { getMemorySearchManager, type MemoryIndexManager } from "./index.js";
|
||||
import "./test-runtime-mocks.js";
|
||||
|
||||
let embedBatchCalls = 0;
|
||||
|
||||
// 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" }),
|
||||
}));
|
||||
|
||||
vi.mock("./embeddings.js", () => {
|
||||
const embedText = (text: string) => {
|
||||
const lower = text.toLowerCase();
|
||||
|
||||
Reference in New Issue
Block a user