reportTestException top-level property

TestExceptionReporter reportTestException

A function that is called by the test framework when an unexpected error occurred during a test.

This function is responsible for reporting the error to the user such that the user can easily diagnose what failed when inspecting the test results. It is also responsible for reporting the error to the test framework itself in order to cause the test to fail.

This function is pluggable to handle the cases where tests are run in contexts other than via flutter test.


TestExceptionReporter get reportTestException => _reportTestException;
void reportTestException=(TestExceptionReporter handler)


set reportTestException(TestExceptionReporter handler) {
  _reportTestException = handler;