diff --git a/test/nodes/core/core/20-inject_spec.js b/test/nodes/core/core/20-inject_spec.js index 0813f1c83..aeeac9dda 100644 --- a/test/nodes/core/core/20-inject_spec.js +++ b/test/nodes/core/core/20-inject_spec.js @@ -100,7 +100,14 @@ describe('inject node', function() { }); helper.request() .post('/inject/n1') - .expect(200).end(function() {}); + .expect(200).end(function(err) { + if (err) { + return helper.clearFlows() + .then(function () { + done(err); + }); + } + }); }); }); diff --git a/test/nodes/core/core/58-debug_spec.js b/test/nodes/core/core/58-debug_spec.js index dc667a69f..f83fc2ca0 100644 --- a/test/nodes/core/core/58-debug_spec.js +++ b/test/nodes/core/core/58-debug_spec.js @@ -231,7 +231,8 @@ describe('debug node', function() { n1.emit("input", {payload:"message 1"}); helper.request() .post('/debug/n1/enable') - .expect(200).end(function() { + .expect(200).end(function(err) { + if (err) { return done(err); } n1.emit("input", {payload:"message 2"}); }); }, function(msg) { @@ -249,7 +250,11 @@ describe('debug node', function() { websocket_test(function(close) { helper.request() .post('/debug/n1/disable') - .expect(200).end(function() { + .expect(201).end(function(err) { + if (err) { + close(); + return done(err); + } n1.emit("input", {payload:"message"}); setTimeout(function() { close();