purescript-httpurple/Test/HTTPure/SpecHelpers.js
Connor Prussin 44df22e331 #22 add support for writing headers and status (#32)
* Add support for writing status code

* Add support for writing headers

* Code cleanup
2017-07-17 16:42:13 -07:00

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;
}
};
};