test(goal): cover projection teardown access

This commit is contained in:
Turtle 2026-08-28 15:52:08 +08:00
parent fddad3a236
commit 16c8cf30ed

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)