Make check() before any other assert
This commit is contained in:
parent
85c70cc5f4
commit
840afa7a77
@ -151,6 +151,8 @@ assert.response = function(server, req, res, msg){
|
|||||||
response.on('end', function(){
|
response.on('end', function(){
|
||||||
if (timer) clearTimeout(timer);
|
if (timer) clearTimeout(timer);
|
||||||
|
|
||||||
|
check();
|
||||||
|
|
||||||
// Assert response body
|
// Assert response body
|
||||||
if (res.body !== undefined) {
|
if (res.body !== undefined) {
|
||||||
var eql = res.body instanceof RegExp
|
var eql = res.body instanceof RegExp
|
||||||
@ -194,7 +196,6 @@ assert.response = function(server, req, res, msg){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
check();
|
|
||||||
callback(response);
|
callback(response);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user