Run check before any assert so server is stopped
This commit is contained in:
parent
9496d83d1c
commit
9d36ae293c
@ -226,6 +226,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
|
||||||
@ -271,7 +273,6 @@ assert.response = function(server, req, res, msg){
|
|||||||
|
|
||||||
// Callback
|
// Callback
|
||||||
callback(response);
|
callback(response);
|
||||||
check();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user