withTestTimeout method

Future<T> withTestTimeout([
  1. Duration timeout = const Duration(seconds: 5)
])

Implementation

Future<T> withTestTimeout([Duration timeout = const Duration(seconds: 5)]) {
  return this.timeout(
    timeout,
    onTimeout: () =>
        throw TimeoutException('Future timed out after $timeout'),
  );
}