test(goal): cover projection teardown access

This commit is contained in:
Turtle committed 2026-08-31 11:23:46 +08:00
1 parent fddad3a236
commit 16c8cf30ed
1 file changed
+1
+1
View File
@@ -240,6 +240,7 @@ describe('GoalService creation and replay', () => {
await fiber.dispose()
expect(ctx.get('goals')).toBeUndefined()
expect(ctx.sessionProjections.stateOf(stub.session, 'goal')).toBeUndefined()
expect(() => first.get(stub.agent)).toThrow('goal projection is not registered')
await ctx.plugin(GoalService)
expect(ctx.goals).not.toBe(first)