andExpect function

void andExpect(
  1. String description,
  2. dynamic actual,
  3. dynamic matcher, {
  4. String? reason,
  5. dynamic skip,
})

Implementation

void andExpect(
  String description,
  actual,
  matcher, {
  String? reason,
  skip,
}) {
  final state = Zone.current[stateKey] as State?;

  switch (state?.key) {
    case thenKey:
      thenExpect(
        description,
        actual,
        matcher,
        reason: reason,
        skip: skip,
      );
      return;
    default:
      throw Exception('Use after kind of then');
  }
}