-
Couldn't load subscription status.
- Fork 0
API Documentation
Configures a new request handler. Must be followed by one of the response definition methods below.
-
requestConfigType: Object
The request to configure a response for.
Defines the HTTP response.
-
statusCodeType: String
The status code the server should respond with. -
responseConfigType: Object
A configuration object containing information on how the server should respond.
Causes HTTP requests to the corresponding request handler to get accepted but never receive a response. This is useful for timeout testing.
Registers a request handler to be used in conjunction with server().hasReceived().
-
requestConfigType: Object
The request to configure a response for.
Verifies that an expected request handler has been called. Must be used in conjunction with one of the methods listed below.
-
requestConfigType: Object
The requestConfig to verify against.
Verify that the server never received the request.
Verify that the server received the request exactly once.
Verify the the server received the request exactly count times.
-
countType: __Number __
The number of expected requests.
Removes all of our registered handlers and reverts the server to its initial state.
-
methodType: String
The name of the HTTP method to use (e.g.GET,POST,PUT, …) -
urlType: String
The URL to be configured.
-
dataType: Object | String
The response body the server should respond with. -
headersType: Object
The HTTP headers key value pairs.