fix(opencode): restore global sync event compatibility
This commit is contained in:
parent
1ed76ccace
commit
5e3026b5ce
9 changed files with 766 additions and 303 deletions
|
|
@ -109,6 +109,19 @@ describe("EventV2", () => {
|
|||
}),
|
||||
)
|
||||
|
||||
it.effect("publishes sync metadata", () =>
|
||||
Effect.gen(function* () {
|
||||
const events = yield* EventV2.Service
|
||||
const aggregateID = EventV2.ID.create()
|
||||
const event = yield* events.publish(SyncMessage, { id: aggregateID, text: "hello" })
|
||||
|
||||
expect(event.sync).toEqual({
|
||||
seq: 0,
|
||||
aggregateID,
|
||||
})
|
||||
}),
|
||||
)
|
||||
|
||||
it.effect("stores definitions in the exported registry", () =>
|
||||
Effect.sync(() => {
|
||||
expect(EventV2.registry.get(Message.type)).toBe(Message)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue