bynk.stub.after_type
Error A test stub … returns <value> after <d> latency is not a Duration.
stub … returns <value> after <delay> makes the stubbed call complete only once the harness clock has advanced by that delay, so the delay must be a Duration, such as 3.seconds. A bare number has no unit, so it is refused rather than guessed at as milliseconds or seconds.
Example
capability Meter { … }
// tests/meter.test.bynkstub Meter.read() returns 7 after 3 // ✗ no unitstub Meter.read() returns 7 after 3.seconds // ✓In the Book
See also
- Every code in its category, Stubs, on the diagnostic index.
bynk explain bynk.stub.after_typeshows the same from the installed toolchain, without a network.