test: trim memory-core test fixture churn

This commit is contained in:
Peter Steinberger
2026-04-06 23:44:49 +01:00
parent 8f592657ed
commit 955f38086b
2 changed files with 3 additions and 5 deletions

View File

@@ -191,9 +191,7 @@ describe("memory cli", () => {
}
async function withQmdIndexDb(content: string, run: (dbPath: string) => Promise<void>) {
const tmpDir = path.join(qmdFixtureRoot, `case-${qmdCaseId++}`);
await fs.mkdir(tmpDir, { recursive: true });
const dbPath = path.join(tmpDir, "index.sqlite");
const dbPath = path.join(qmdFixtureRoot, `case-${qmdCaseId++}.sqlite`);
await fs.writeFile(dbPath, content, "utf-8");
await run(dbPath);
}

View File

@@ -124,7 +124,7 @@ describe("short-term promotion", () => {
it("serializes concurrent recall writes so counts are not lost", async () => {
await withTempWorkspace(async (workspaceDir) => {
await Promise.all(
Array.from({ length: 12 }, (_, index) =>
Array.from({ length: 8 }, (_, index) =>
recordShortTermRecalls({
workspaceDir,
query: `backup-${index % 4}`,
@@ -149,7 +149,7 @@ describe("short-term promotion", () => {
minUniqueQueries: 0,
});
expect(ranked).toHaveLength(1);
expect(ranked[0]?.recallCount).toBe(12);
expect(ranked[0]?.recallCount).toBe(8);
expect(ranked[0]?.uniqueQueries).toBe(4);
});
});