expect function

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

Assert that actual matches matcher.

See matcher_expect.expect for details. This is a variant of that function that additionally verifies that there are no asynchronous APIs that have not yet resolved.

See also:

Implementation

void expect(
  dynamic actual,
  dynamic matcher, {
  String? reason,
  dynamic skip, // true or a String
}) {
  TestAsyncUtils.guardSync();
  matcher_expect.expect(actual, matcher, reason: reason, skip: skip);
}