Skip to content
Playground(another site)

bynk.stub.unknown_op

Error A test stub names an operation the capability does not declare.

stub Cap.op(…) overrides one operation of a capability, so op must be declared by that capability. A misspelt or renamed operation matches nothing, so the stub is refused instead of leaving the default provider in place unannounced. Use the operation name the capability declares. See bynk.stub.not_a_seam when the capability itself is the wrong one.

Example

demo/meter.bynk
capability Meter { … }
// tests/meter.test.bynk
stub Meter.reed() returns 7 // ✗ Meter has no `reed`
stub Meter.read() returns 7 // ✓

In the Book

See also

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