Skip to content
Playground(another site)

bynk.test.ws_needs_in_process

Error A system-tier case drives a from websocket service by address (svc.open(tc, …), svc.message(tc, frame), svc.close(tc)); a deployed WebSocket is a real upgrade through the Worker and a Durable Object, which a system case does not drive, so the case runs at unit or integration.

svc.open(tc, …), svc.message and svc.close drive a from websocket service in process, against a TestConnection. A deployed WebSocket is a real upgrade through the Worker and a Durable Object, which a system case does not drive, so the address has nothing to run. Drive the service in a case at unit or integration instead.

Example

tests/room.test.bynk
case "a join" as system { // ✗ a `system` case cannot drive a WebSocket
case "a join" as integration { // ✓
let tc = TestConnection[Frame]()
let _ <- Gateway.open(tc, Val[RoomId]) by Member(Val[UserId])
}

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.ws_needs_in_process shows the same from the installed toolchain, without a network.