Jelajahi Sumber

test(session-projection): scope projection assertions

_Kerman 1 bulan lalu
induk
melakukan
8eb0c50e74

+ 2 - 2
packages/goal/goal/tests/projection.spec.ts

@@ -81,7 +81,7 @@ describe('goal projection unit', () => {
   it('serves null before the first create', async () => {
     const bench = await harness(true)
     seedMessage(bench.session)
-    expect(bench.tailValues()).toEqual({ goal: null })
+    expect(bench.tailValues().goal).toBeNull()
     expect(bench.tailAsOfSeq()).toBe(bench.session.seq - 1)
   })
 
@@ -199,7 +199,7 @@ describe('goal projection unit', () => {
     const bench = await harness(false)
     seedMessage(bench.session)
     const fiber = await bench.ctx.plugin(GoalService)
-    expect(bench.tailValues()).toEqual({ goal: null })
+    expect(bench.tailValues().goal).toBeNull()
     await fiber.dispose()
     expect('goal' in (bench.tailValues() ?? {})).toBe(false)
   })

+ 1 - 1
packages/plan/plan-mode/tests/projection.spec.ts

@@ -74,7 +74,7 @@ function commitPlanMode(session: Session, active: boolean, turn: number): void {
 describe('plan projection unit', () => {
   it('serves inactive/not-pending for the empty log', async () => {
     const bench = await harness(true)
-    expect(bench.values()).toEqual({ plan: { active: false, pending: false } })
+    expect(bench.values().plan).toEqual({ active: false, pending: false })
   })
 
   it('a logged /plan selection reads pending until plan/mode records it', async () => {