mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-24 07:01:49 +00:00
test(perf): trim qmd manager fixture setup overhead
This commit is contained in:
@@ -131,11 +131,12 @@ describe("QmdMemoryManager", () => {
|
||||
logDebugMock.mockClear();
|
||||
logInfoMock.mockClear();
|
||||
tmpRoot = path.join(fixtureRoot, `case-${fixtureCount++}`);
|
||||
await fs.mkdir(tmpRoot);
|
||||
workspaceDir = path.join(tmpRoot, "workspace");
|
||||
await fs.mkdir(workspaceDir);
|
||||
stateDir = path.join(tmpRoot, "state");
|
||||
await fs.mkdir(stateDir);
|
||||
await Promise.all([
|
||||
fs.mkdir(workspaceDir, { recursive: true }),
|
||||
fs.mkdir(stateDir, { recursive: true }),
|
||||
]);
|
||||
process.env.OPENCLAW_STATE_DIR = stateDir;
|
||||
cfg = {
|
||||
agents: {
|
||||
@@ -152,7 +153,7 @@ describe("QmdMemoryManager", () => {
|
||||
} as OpenClawConfig;
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
afterEach(() => {
|
||||
vi.useRealTimers();
|
||||
delete process.env.OPENCLAW_STATE_DIR;
|
||||
delete (globalThis as Record<string, unknown>).__openclawMcporterDaemonStart;
|
||||
|
||||
Reference in New Issue
Block a user