diff --git a/test/support/assert.js b/test/support/assert.js index 2c7e174f..97c8fce3 100644 --- a/test/support/assert.js +++ b/test/support/assert.js @@ -226,6 +226,8 @@ assert.response = function(server, req, res, msg){ response.on('end', function(){ if (timer) clearTimeout(timer); + check(); + // Assert response body if (res.body !== undefined) { var eql = res.body instanceof RegExp @@ -271,7 +273,6 @@ assert.response = function(server, req, res, msg){ // Callback callback(response); - check(); }); });