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

add consistent timeouts to tail file write tests

This commit is contained in:
Dave C-J 2014-08-27 10:08:44 +01:00
parent df751be331
commit 6b04d512ae

View File

@ -61,7 +61,10 @@ describe('TailNode', function() {
done();
}
});
fs.appendFileSync(fileToTail, "Tail message line 3\nTail message line 4\n");
setTimeout( function() {
fs.appendFileSync(fileToTail, "Tail message line 3\n");
fs.appendFileSync(fileToTail, "Tail message line 4\n");
},150);
});
});
@ -77,7 +80,9 @@ describe('TailNode', function() {
msg.payload.should.equal("Tail message line 5\nTail message line 6\n");
done();
});
fs.appendFileSync(fileToTail, "Tail message line 5\nTail message line 6\n");
setTimeout( function() {
fs.appendFileSync(fileToTail, "Tail message line 5\nTail message line 6\n");
},150);
});
});
@ -103,7 +108,7 @@ describe('TailNode', function() {
setTimeout( function() {
fs.appendFileSync(fileToTail, "Tail message line A\n");
fs.appendFileSync(fileToTail, "Tail message line A\n");
},250);
},150);
});
});