Expect that no outstanding requests match the given matcher, and throw an error if any do.
Expect that a single outstanding request matches the given matcher, and return it.
Requests returned through this API will no longer be in the list of open requests, and thus will not match twice.
Handle an incoming request by queueing it in the list of open requests.
Search for requests in the list of open requests, and return all that match without asserting anything about the number of matches.
Validate that there are no outstanding requests.
Generated using TypeDoc
A testing backend for
HttpClient
which both acts as anHttpBackend
and as theHttpTestingController
.HttpClientTestingBackend
works by keeping a list of all open requests. As requests come in, they're added to the list. Users can assert that specific requests were made and then flush them. In the end, a verify() method asserts that no unexpected requests were made.