throwsAssertionError top-level property
A matcher for functions that throw AssertionError.
This is equivalent to throwsA(isA<AssertionError>()).
If you are trying to test whether a call to ComponentTester.pumpComponent
results in an AssertionError, see
TestComponentsFlutterBinding.takeException.
See also:
throwsFlutterError, to test if a function throws aFlutterError.- 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);