Browse Source

test(connection): expect fixture todos projection null on empty log

07akioni 2 tháng trước cách đây
mục cha
commit
2c65ebf6be
1 tập tin đã thay đổi với 4 bổ sung và 1 xóa
  1. 4 1
      packages/client/connection/tests/fixture.spec.ts

+ 4 - 1
packages/client/connection/tests/fixture.spec.ts

@@ -69,7 +69,10 @@ describe('createFixtureApi', () => {
     // tail block still rides it — empty-log cut at -1, the host convention.
     const empty = await api.sessions.history(req({ sessionId: sid('no-such'), maxMessages: 10 }))
     if (!empty.result.ok) throw new Error('empty failed')
-    expect(empty.result.value).toEqual({ events: [], hasMore: false, projections: { asOfSeq: -1, values: {} } })
+    // Fixture composes the todos unit (host parallel when tool-todo is mounted): null before any write.
+    expect(empty.result.value).toEqual({
+      events: [], hasMore: false, projections: { asOfSeq: -1, values: { todos: null } },
+    })
   })
 
   it('serves grouped models and keeps a selected target for later history and fixture requests', async () => {