From cbb7a13d98ecaf26fb032f2bd374fc9a391d4a99 Mon Sep 17 00:00:00 2001 From: Tobi Lutke Date: Sat, 13 Dec 2025 13:17:15 -0500 Subject: [PATCH] Update test to expect all matching contexts joined Test now expects contexts to be joined with \n\n as implemented --- src/store.test.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/store.test.ts b/src/store.test.ts index 602cf64..07b5558 100644 --- a/src/store.test.ts +++ b/src/store.test.ts @@ -601,7 +601,7 @@ describe("Path Context", () => { await cleanupTestDb(store); }); - test("getContextForFile returns most specific context", async () => { + test("getContextForFile returns all matching contexts", async () => { const store = await createTestStore(); const collectionName = await createTestCollection({ pwd: "/test/collection", glob: "**/*.md" }); await addPathContext(collectionName, "/", "General test files"); @@ -622,9 +622,10 @@ describe("Path Context", () => { displayPath: "docs/api/reference.md", }); + // Context now returns ALL matching contexts joined with \n\n expect(store.getContextForFile("/test/collection/readme.md")).toBe("General test files"); - expect(store.getContextForFile("/test/collection/docs/guide.md")).toBe("Documentation files"); - expect(store.getContextForFile("/test/collection/docs/api/reference.md")).toBe("API documentation"); + expect(store.getContextForFile("/test/collection/docs/guide.md")).toBe("General test files\n\nDocumentation files"); + expect(store.getContextForFile("/test/collection/docs/api/reference.md")).toBe("General test files\n\nDocumentation files\n\nAPI documentation"); await cleanupTestDb(store); });