Open hellboy81 opened 9 years ago
I'm trying to use `mock-req
`mock-req
Initialization in Unit tests:
MockReq = require('mock-req'), var req = new MockReq(); // req.header = function(){} // with this line it does not work also
Testable code:
if (req.header('content-range')) {
I'm getting message:
TypeError: Object #<MockIncomingMessage> has no method 'header'
According to http://nodejs.org/api/http.html#http_http_incomingmessage there is no method 'header'.
I'm trying to use
`mock-req
Initialization in Unit tests:
Testable code:
I'm getting message: