mirror of
https://github.com/vercel/workflow.git
synced 2026-09-14 19:59:43 +08:00
234412a9d7
Translates the diagrammed pattern into 5 prefix-replay tests that run the same workflow against progressively longer prefixes of a 5-event log (hook_created, wait_created, hook_received A, wait_completed, hook_received B). Each test asserts the consumer takes the same deterministic path: suspending at the right intermediate point with the right invocationsQueue state, or completing with race winners [hookA, sleep]. The full-log test verifies that the trailing hook_received B is consumed by the dangling race-2 hook awaiter without producing an unconsumed-event error. Runs in both sync and async deserialization modes via the existing defineTests harness.
8 B
8 B