Skip to content
Playground(another site)

bynk.stub.not_a_seam

Error A test stub overrides a capability the unit under test does not consume.

A stub substitutes one of the capabilities the unit under test depends on: one the context declares, or reaches through a consumes. Any other name, including a misspelt one, leaves nothing to substitute. A commons has no capabilities, so it cannot be stubbed at all. Name a capability of the target, or add the consumes it needs. See bynk.stub.unknown_op for a wrong operation.

Example

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

In the Book

See also

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