This commit is contained in:
Talor Berthelson
2016-06-17 20:49:15 -04:00
commit 889faf9c1c
699 changed files with 112020 additions and 0 deletions

26
node_modules/oauth/tests/shared.js generated vendored Normal file
View File

@@ -0,0 +1,26 @@
var events = require('events');
exports.DummyResponse = function( statusCode ) {
this.statusCode= statusCode;
this.headers= {};
}
exports.DummyResponse.prototype= events.EventEmitter.prototype;
exports.DummyResponse.prototype.setEncoding= function() {}
exports.DummyRequest =function( response ) {
this.response= response;
this.responseSent= false;
}
exports.DummyRequest.prototype= events.EventEmitter.prototype;
exports.DummyRequest.prototype.write= function(post_body){}
exports.DummyRequest.prototype.write= function(post_body){
this.responseSent= true;
this.emit('response',this.response);
}
exports.DummyRequest.prototype.end= function(){
if(!this.responseSent) {
this.responseSent= true;
this.emit('response',this.response);
}
this.response.emit('end');
}