chai-express-handler
Version:
Helpers for testing Express handlers with the Chai assertion library.
21 lines (18 loc) • 353 B
JavaScript
/**
* Creates an instance of `Request`.
*
* This class is used as a mock when testing Express handlers, substituted in
* place of of a Node's `http.IncomingMessage`.
*
* @constructor
* @api protected
*/
function Request() {
this.method = 'GET';
this.url = '/';
this.headers = {};
}
/**
* Expose `Request`.
*/
module.exports = Request;