mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Changing timing in trigger node test
This commit is contained in:
parent
e6ffa3d143
commit
64d6e1f8e1
@ -996,18 +996,18 @@ describe('trigger node', function() {
|
|||||||
}
|
}
|
||||||
catch(err) { done(err); }
|
catch(err) { done(err); }
|
||||||
});
|
});
|
||||||
setTimeout( function() {
|
|
||||||
if (c === 2) { done(); }
|
|
||||||
else {
|
|
||||||
done(new Error("Too many messages received"));
|
|
||||||
}
|
|
||||||
},20);
|
|
||||||
n1.emit("input", {payload:null}); // trigger
|
n1.emit("input", {payload:null}); // trigger
|
||||||
n1.emit("input", {payload:null}); // blocked
|
n1.emit("input", {payload:null}); // blocked
|
||||||
n1.emit("input", {payload:null}); // blocked
|
n1.emit("input", {payload:null}); // blocked
|
||||||
n1.emit("input", {payload:"foo"}); // don't clear the blockage
|
n1.emit("input", {payload:"foo"}); // don't clear the blockage
|
||||||
n1.emit("input", {payload:"boo"}); // clear the blockage
|
n1.emit("input", {payload:"boo"}); // clear the blockage
|
||||||
n1.emit("input", {payload:null}); // trigger
|
n1.emit("input", {payload:null}); // trigger
|
||||||
|
setTimeout( function() {
|
||||||
|
if (c === 2) { done(); }
|
||||||
|
else {
|
||||||
|
done(new Error("Too many messages received"));
|
||||||
|
}
|
||||||
|
},50);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user