Skip to content

Loading…

Test framework hangs on error status codes #34

Open
wants to merge 1 commit into from

1 participant

@ratdaddy

Some test frameworks (at least cucumis) hang when tobi doesn't consume the 'end' event on status codes indicating errors (>=400).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 25, 2011
  1. @ratdaddy
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/browser.js
View
4 lib/browser.js
@@ -228,7 +228,9 @@ Browser.prototype.request = function(method, path, options, fn, saveHistory){
self.request('GET', path, options, fn);
// Error
} else {
- fn(res);
+ res.on('end', function() {
+ fn(res);
+ });
}
});
Something went wrong with that request. Please try again.