completes top-level property

Matcher completes
final

Matches a Future that completes successfully with a value.

Note that this creates an asynchronous expectation. The call to expect() that includes this will return immediately and execution will continue. Later, when the future completes, the actual expectation will run.

To test that a Future completes with an exception, you can use throws and throwsA.

This returns an AsyncMatcher, so expect won't complete until the matched future does.

Implementation

final Matcher completes = const _Completes(null)