From ea22ffa2bf6b3ea14b4b857b6e210f455a767ecb Mon Sep 17 00:00:00 2001 From: zobalogh Date: Thu, 7 Aug 2014 13:23:20 +0100 Subject: [PATCH] Fixing test termination --- test/nodes/core/storage/28-tail_spec.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/nodes/core/storage/28-tail_spec.js b/test/nodes/core/storage/28-tail_spec.js index 3e9c805bd..ea0ba849c 100644 --- a/test/nodes/core/storage/28-tail_spec.js +++ b/test/nodes/core/storage/28-tail_spec.js @@ -72,8 +72,10 @@ describe('TailNode', function() { helperNode1.on("input", function(msg) { msg.should.have.property('topic', fileToTail); msg.payload.should.equal("Tail message line" + (++inputCounter)); + if(inputCounter === 2) { + done(); + } }); - done(); }); }); @@ -86,8 +88,8 @@ describe('TailNode', function() { helperNode1.on("input", function(msg) { msg.should.have.property('topic', fileToTail); msg.payload.should.equal("Tail message line1\nTail message line2\n"); + done(); }); - done(); }); }); });