expectOk<T> function
Requires actual to be Ok and returns its value for further assertions.
Implementation
T expectOk<T>(Result<T> actual) => switch (actual) {
Ok<T>(:final value) => value,
Err<T>(:final problem) => throw TestHelperFailure(
'Expected Ok, got Err carrying $problem.',
),
};