mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-28 08:52:45 +00:00
test: trim memory-core test fixture churn
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user