Skip to content

Commit d3e7d91

Browse files
committed
test(memory): update store test for removed incrementAccess
Replace test for removed incrementAccess() with test verifying UPSERT access_count increment behavior
1 parent abfd580 commit d3e7d91

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

packages/opencode/test/memory/store.test.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,11 @@ describe("MemoryStore", () => {
5858
expect(result!.access_count).toBe(1) // UPSERT increments on merge
5959
})
6060

61-
test("incrementAccess updates count", () => {
62-
MemoryStore.save({ projectPath, type: "general", topic: "t1", content: "test" })
63-
const memories = MemoryStore.list(projectPath)
64-
const id = memories[0].id
65-
66-
MemoryStore.incrementAccess(id)
67-
const updated = MemoryStore.list(projectPath)
68-
expect(updated[0].access_count).toBe(1)
61+
test("UPSERT increments access_count on merge", () => {
62+
MemoryStore.save({ projectPath, type: "general", topic: "t1", content: "initial" })
63+
MemoryStore.save({ projectPath, type: "general", topic: "t1", content: "updated" })
64+
const result = MemoryStore.getByTopic("t1", projectPath)
65+
expect(result!.access_count).toBe(1) // UPSERT increments once on merge
6966
})
7067

7168
test("delete removes a memory", () => {

0 commit comments

Comments
 (0)