bynk.suite.fn_effectful
Error A suite helper fn returns an Effect; suite helpers are pure.
A suite helper is a pure function that builds a value for a case: a request, a fixture, an expected result. Returning an Effect would hide a step of the test inside a helper. Build the value in the helper and run the effect in the case, where each step is visible with <-.
Example
fn bump(n: Int) -> Effect[Int] { local.call(n) } // ✗ returns an `Effect`fn start() -> Int { 1 } // ✓ build the valuelet n <- local.call(start()) // ✓ run it in the caseIn the Book
See also
- The grammar rule it governs:
fn_decl. - Every code in its category, Suites and cases, on the diagnostic index.
bynk explain bynk.suite.fn_effectfulshows the same from the installed toolchain, without a network.