fix(memory-qmd): create collections via qmd CLI (no YAML)

This commit is contained in:
Vignesh Natarajan
2026-01-28 00:33:17 -08:00
committed by Vignesh
parent dd8373a424
commit 564fe6f089
2 changed files with 29 additions and 67 deletions

View File

@@ -78,17 +78,19 @@ describe("QmdMemoryManager", () => {
expect(manager).toBeTruthy();
if (!manager) throw new Error("manager missing");
const baselineCalls = spawnMock.mock.calls.length;
await manager.sync({ reason: "manual" });
expect(spawnMock.mock.calls.length).toBe(2);
expect(spawnMock.mock.calls.length).toBe(baselineCalls + 2);
await manager.sync({ reason: "manual-again" });
expect(spawnMock.mock.calls.length).toBe(2);
expect(spawnMock.mock.calls.length).toBe(baselineCalls + 2);
(manager as unknown as { lastUpdateAt: number | null }).lastUpdateAt =
Date.now() - (resolved.qmd?.update.debounceMs ?? 0) - 10;
await manager.sync({ reason: "after-wait" });
expect(spawnMock.mock.calls.length).toBe(4);
expect(spawnMock.mock.calls.length).toBe(baselineCalls + 4);
await manager.close();
});