throws property

Checks that the tested future completes with an error.

Implementation

Future<Expector<Object>> get throws async {
  var capture = CaptureThrownValueMatcher();
  await test.expectLater(() => value, test.throwsA(capture));
  return Expector<Object>(capture.value);
}