Skip to content
Playground(another site)

bynk.test.service_call_arity

Error A test body's svc.call(...) passes the wrong number of arguments for the service's on call handler.

svc.call(…) in a test runs the service's on call handler, so it takes that handler's parameters, and the number of arguments is checked as for any call. Add or remove arguments to match the handler. The asset address, svc.GET(asset), takes the asset alone, and this code covers extra arguments there too.

Example

demo/svc.bynk
service echo { … }
// tests/svc.test.bynk
let r <- echo.call(1, 2) // ✗ the handler takes one
let r <- echo.call(1) // ✓

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