Expect that no errors were handled which match the given message or predicate. If a matching error was handled, fail with a message including description, if provided.
Optionaldescription: stringExpect that a single error was handled that matches the given message or predicate, and return it. If no such error was handled, or more than one, fail with a message including description, if provided.
Optionaldescription: stringIn addition to tracking the error, this call's Angular's ErrorHandler.handleError, prints the error to the console and may print additional information that could be helpful for finding the source of the error.
Search for errors that match the given message or predicate, without any expectations.
Verify that no unmatched errors are outstanding. If any are, fail with a message indicating which calls were not matched.
StaticoverrideConvenience method to put in a provide array, to override Angular's default error handler. You do not need to use this if you are using AngularContext, which automatically provides it.
TestBed.configureTestingModule({
providers: [MockErrorHandler.overrideProvider()],
});
An error handler to be used in tests, that keeps track of all errors it handles and allows for expectations to run on them. Automatically included in AngularContext.