.mockNetworkResponse() Suggest edits
Since: 2.2.0Intercept the request made on a particular URL and mock the response.
Usage
.mockNetworkResponse(urlToIntercept, {status, headers, body}, [callback])
Example
Or run locally with:
Parameters
Name | Type | description |
---|---|---|
urlToIntercept |
string | URL to intercept and mock the response from. |
response |
object | Response to return. Defaults: |
callback Optional |
function | Callback function to be called when the command finishes. |