44df22e331
* Add support for writing status code * Add support for writing headers * Code cleanup
20 lines
329 B
JavaScript
20 lines
329 B
JavaScript
"use strict";
|
|
|
|
exports.mockResponse = function() {
|
|
return {
|
|
body: "",
|
|
headers: {},
|
|
|
|
write: function(str) {
|
|
this.body = this.body + str;
|
|
},
|
|
|
|
end: function() {
|
|
},
|
|
|
|
setHeader: function(header, val) {
|
|
this.headers[header] = val;
|
|
}
|
|
};
|
|
};
|