throwsAssertionError top-level property
final
A matcher for functions that throw AssertionError.
This is equivalent to throwsA(isA<AssertionError>())
.
If you are trying to test whether a call to WidgetTester.pumpWidget results in an AssertionError, see TestWidgetsFlutterBinding.takeException.
See also:
- throwsFlutterError, to test if a function throws a FlutterError.
- throwsArgumentError, to test if a functions throws an ArgumentError.
- isAssertionError, to test if any object is any kind of AssertionError.
Implementation
final Matcher throwsAssertionError = throwsA(isAssertionError);