1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

add debug to trigger test to help work out fails

This commit is contained in:
Dave Conway-Jones 2018-05-24 10:02:51 +01:00
parent fcbea2629c
commit 3df3d6f516
No known key found for this signature in database
GPG Key ID: 9E7F9C73F5168CD4

View File

@ -428,13 +428,14 @@ describe('trigger node', function() {
n2.on("input", function(msg) {
try {
if (c === 0) {
console.log(c,Date.now() - ss,msg);
msg.should.have.a.property("payload", "Hello");
c += 1;
}
else {
console.log(c,Date.now() - ss,msg);
msg.should.have.a.property("payload", "World");
//console.log(Date.now() - ss);
(Date.now() - ss).should.be.greaterThan(140);
(Date.now() - ss).should.be.greaterThan(150);
done();
}
}
@ -444,7 +445,7 @@ describe('trigger node', function() {
n1.emit("input", {payload:"Hello"});
setTimeout( function() {
n1.emit("input", {payload:"Error"});
},20);
},30);
setTimeout( function() {
n1.emit("input", {payload:"World"});
},150);