expectAsync function

  1. @Deprecated("Will be removed in 0.13.0")
Function expectAsync (Function callback, { int count: 1, int max: 0, String id, String reason })

This function is deprecated because it doesn't work well with strong mode. Use expectAsync0, expectAsync1, expectAsync2, expectAsync3, expectAsync4, expectAsync5, or expectAsync6 instead.

Implementation

@Deprecated("Will be removed in 0.13.0")
Function expectAsync(Function callback,
    {int count = 1, int max = 0, String id, String reason}) {
  if (Invoker.current == null) {
    throw StateError("expectAsync() may only be called within a test.");
  }

  return _ExpectedFunction(callback, count, max, id: id, reason: reason).func;
}