resDoesReturnSelf(funcName)

Some Http libraries in Node allow chainable functionality. For example, the following is a common express paradigm: res.statusCode(200).send(result). To ensure Maddox allows a chainable interface like this, it allows the user to define which functions should be chainable by using the 'resDoesReturnSelf'. For the status code example, you would want to add 'resDoesReturnSelf("statusCode")' to your scenario. funcName {String}* - The name of the function to be mocked on the HttpResponse object.

  • returns {HttpReqScenario}