Skip to content

Commit

Permalink
Update to use q 0.8.10
Browse files Browse the repository at this point in the history
  • Loading branch information
arikon committed Nov 7, 2012
1 parent 34d2b24 commit fd8e287
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -16,7 +16,7 @@
],
"main": "q-http.js",
"dependencies": {
"q": "0.8.4",
"q": "0.8.10",
"q-io": "0.0.13"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion q-http.js
Expand Up @@ -84,7 +84,7 @@ exports.Server = function (respond) {

})
})
.end(); // should be .fail(self.emitter("error"))
.done(); // should be .fail(self.emitter("error"))

});

Expand Down
5 changes: 2 additions & 3 deletions test/deferred.js
Expand Up @@ -31,7 +31,7 @@ var server = HTTP.Server(function () {
return response;
});

Q.when(server.listen(8080), function () {
Q.done(server.listen(8080), function () {
return Q.when(HTTP.request(request), function (response) {
return Q.when(response.body, function (body) {
var done = body.forEach(function (chunk) {
Expand All @@ -40,6 +40,5 @@ Q.when(server.listen(8080), function () {
Q.when(done, server.stop);
});
});
})
.end();
});

9 changes: 4 additions & 5 deletions test/keep-alive.js
Expand Up @@ -24,19 +24,18 @@ var server = HTTP.Server(function () {
return response;
});

Q.when(server.listen(8080), function () {
Q.done(server.listen(8080), function () {

var done = [1,2,3].reduce(function (done) {
return Q.when(HTTP.request(request), function (response) {
return Q.when(response.body, function (body) {
return Q.when(body.forEach(function (chunk) {
return Q.all([body.forEach(function (chunk) {
console.log(chunk.toString('utf-8'));
})).wait(done);
}), done]);
});
});
}, undefined);

return Q.when(done, server.stop);
})
.end();
});

0 comments on commit fd8e287

Please sign in to comment.