Skip to content
Playground(another site)

bynk.test.event_needs_in_process

Error A system-tier case delivers an event with svc.event(e); at system an event reaches a subscriber only through its publisher's fan-out, so the case drives the emitting handler instead, or delivers the event at unit or integration.

svc.event(e) hands an event straight to a subscriber. At system, an event reaches a subscriber only through its publisher's fan-out across the deployed Workers, so there is no direct delivery to make. Drive the handler that publishes the event, or deliver the event at unit or integration. For the on call equivalent, see bynk.test.call_needs_in_process.

Example

shop/ledger.bynk
service OnPlaced from Events(Placed) { … }
// tests/ledger.test.bynk
case "a placed order is booked" as system { // ✗ no direct delivery at `system`
case "a placed order is booked" { // ✓
let _ <- OnPlaced.event(Placed { id: "o1" })
}

In the Book

See also

  • The grammar rule it governs: case.
  • Every code in its category, Tests, on the diagnostic index.
  • bynk explain bynk.test.event_needs_in_process shows the same from the installed toolchain, without a network.