Run check before any assert so server is stopped

This commit is contained in:
Raul Ochoa
2014-09-18 19:07:15 +02:00
parent 9496d83d1c
commit 9d36ae293c
+2 -1
View File
@@ -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();
});
});