test(core): align event persistence expectations (#40783)

This commit is contained in:
Kit Langton 2026-08-05 21:50:45 -04:00 committed by GitHub
parent 0c558a6856
commit 03e9789064
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View file

@ -1018,7 +1018,10 @@ describe("DatabaseMigration", () => {
}),
).pipe(
Effect.provide(
AppNodeBuilder.build(LayerNode.group([Bus.node, SessionProjector.node]), [[Database.node, database]]),
AppNodeBuilder.build(LayerNode.group([Bus.node, SessionProjector.node]), [
[Database.node, database],
[Bus.node, Bus.configured({ persist: true })],
]),
),
)

View file

@ -46,7 +46,9 @@ describe("Session.log", () => {
const items = Array.from(yield* Stream.runCollect(session.log({ sessionID: created.id })))
expect(items.map((item) => item.type)).toEqual(["session.created", "session.renamed", "log.synced"])
// Session creation commits a non-public durable event, so the marker's
// seq covers more of the aggregate than the public events emitted.
expect(items.map((item) => item.type)).toEqual(["session.renamed", "log.synced"])
expect(items.at(-1)).toEqual({ type: "log.synced", aggregateID: created.id, seq: Event.Seq.make(1) })
}),
)