expectSome<T> function

T expectSome<T>(
  1. Option<T> actual
)

Requires actual to be Some and returns its value.

Implementation

T expectSome<T>(Option<T> actual) => switch (actual) {
  Some<T>(:final value) => value,
  None<T>() => throw const TestHelperFailure('Expected Some, got None.'),
};