expectLater function

Future expectLater (
  1. dynamic actual,
  2. dynamic matcher,
  3. {String reason,
  4. dynamic skip}
)

Just like expect, but returns a Future that completes when the matcher has finished matching.

For the completes and completion matchers, as well as throwsA and related matchers when they're matched against a Future, the returned future completes when the matched future completes. For the prints matcher, it completes when the future returned by the callback completes. Otherwise, it completes immediately.

If the matcher fails asynchronously, that failure is piped to the returned future where it can be handled by user code.

Implementation

Future expectLater(actual, matcher, {String reason, skip}) =>
    _expect(actual, matcher, reason: reason, skip: skip);