Make check() before any other assert

This commit is contained in:
Raul Ochoa 2014-08-27 16:39:16 +02:00
parent 85c70cc5f4
commit 840afa7a77

View File

@ -151,6 +151,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
@ -194,7 +196,6 @@ assert.response = function(server, req, res, msg){
}
}
check();
callback(response);
});
});