Skip to content
Playground(another site)

bynk.stub.at_system

Error A test stub is in a system-tier case, or at the scope of a suite … as system (or a suite whose cases run as system); each context runs as the Worker it deploys as, which builds its own capability providers, so there is no seam to override.

At the system tier each context runs as the Worker it deploys as, and that Worker builds its own capability providers, so there is no seam for a stub to override. A stub there would be accepted and then ignored, so it is refused. Move the case to a suite below system, where a stub replaces the seam, or remove the stub and test the real provider.

Example

suite demo.desk as system {
stub Meter.read() returns 7 // ✗ a `system` suite has no seam to stub
case "the desk checks" { … }
}
suite demo.desk {
stub Meter.read() returns 7 // ✓ below `system` the seam can be stubbed
case "the desk checks" { … }
}

In the Book

See also

  • The grammar rule it governs: stub_clause.
  • Every code in its category, Stubs, on the diagnostic index.
  • bynk explain bynk.stub.at_system shows the same from the installed toolchain, without a network.