Skip to content
Playground(another site)

bynk.observe.unknown_op

Error An observation names an operation the capability does not declare.

expect Cap.op called checks the calls recorded for one operation of a capability, so op must be declared by that capability. A misspelt or renamed operation would match no call, so it is refused instead of leaving the check vacuous. Use the name the capability declares. A capability the unit does not consume is bynk.observe.not_a_seam.

Example

demo/pay.bynk
capability Logger { … }
// tests/pay.test.bynk
expect Logger.nope called // ✗ Logger has no `nope`
expect Logger.log called // ✓

In the Book

See also

  • Every code in its category, Observation, on the diagnostic index.
  • bynk explain bynk.observe.unknown_op shows the same from the installed toolchain, without a network.