test: cover session preparation lifecycle

This commit is contained in:
imccyu
2026-08-05 22:54:27 +08:00
parent 0afc42309d
commit deefceaf8a
9 changed files with 274 additions and 126 deletions
@@ -69,7 +69,7 @@ async function load(root: string): Promise<SessionEvent[]> {
await ctx.plugin(SessionStore)
await ctx.plugin(SessionPersistenceJsonl, { root, compression: 'none' })
try {
return (await ctx.sessionPersistence.load(sessionId)).events
return [...(await ctx.sessionPersistence.load(sessionId)).events]
} finally {
await ctx.fiber.dispose()
}