mirror of
https://github.com/anomalyco/opencode.git
synced 2026-08-09 13:03:22 +00:00
test(core): align event persistence expectations (#40783)
This commit is contained in:
parent
0c558a6856
commit
03e9789064
2 changed files with 7 additions and 2 deletions
|
|
@ -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 })],
|
||||
]),
|
||||
),
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -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) })
|
||||
}),
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue