mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
delay - add test for push toFront and flush=1
This commit is contained in:
parent
a2b95dbb39
commit
4d26b806dd
@ -824,7 +824,7 @@ describe('delay Node', function() {
|
|||||||
}
|
}
|
||||||
else if (msg.topic === "doo") {
|
else if (msg.topic === "doo") {
|
||||||
msg.payload.should.equal(1);
|
msg.payload.should.equal(1);
|
||||||
(Date.now() - t).should.be.approximately(404,50);
|
(Date.now() - t).should.be.approximately(4,50);
|
||||||
c = c + 1;
|
c = c + 1;
|
||||||
}
|
}
|
||||||
if (c === 5) { done(); }
|
if (c === 5) { done(); }
|
||||||
@ -837,7 +837,7 @@ describe('delay Node', function() {
|
|||||||
delayNode1.receive({payload:1,topic:"aoo"});
|
delayNode1.receive({payload:1,topic:"aoo"});
|
||||||
setImmediate( function() { delayNode1.receive({payload:1,topic:"boo"}); } );
|
setImmediate( function() { delayNode1.receive({payload:1,topic:"boo"}); } );
|
||||||
setImmediate( function() { delayNode1.receive({payload:1,topic:"coo",toFront:true}); } );
|
setImmediate( function() { delayNode1.receive({payload:1,topic:"coo",toFront:true}); } );
|
||||||
setImmediate( function() { delayNode1.receive({payload:1,topic:"doo"}); } );
|
setImmediate( function() { delayNode1.receive({payload:1,topic:"doo",toFront:true,flush:1}); } );
|
||||||
setImmediate( function() { delayNode1.receive({payload:1,topic:"eoo",toFront:true}); } );
|
setImmediate( function() { delayNode1.receive({payload:1,topic:"eoo",toFront:true}); } );
|
||||||
setImmediate( function() { delayNode1.receive({flush:1}); });
|
setImmediate( function() { delayNode1.receive({flush:1}); });
|
||||||
setTimeout( function() { delayNode1.receive({flush:1}); }, 200);
|
setTimeout( function() { delayNode1.receive({flush:1}); }, 200);
|
||||||
|
Loading…
Reference in New Issue
Block a user