A "fixture" defines the handler for an specific request and the response to be sent.
The standard format for defining a fixture is to declare an object containing next properties:
<String>Used as a reference for grouping fixtures in "behaviors", etc.
uri as <String>Uri of the resource. It can contains expressions for matching dynamic uris. Read the route-parser documentation for further info about how to use dynamic routing.
<String>Method of the request. Defines to which method will response this fixture. Valid values are http request methods, such as "GET", "POST", "PUT", etc.
<Object>Defines the response that the server will send to the request:
<Number>Status code to send.
<Object>Object to send as body in the response.
nextarguments, so you will be free to handle the request at your convenience.
This is the standard format of defining fixtures, but more formats can be added using the
In the next example you can see how fixtures are defined using