mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
adjust timing on file tail test
Runs cleaner on Mac
This commit is contained in:
@@ -89,7 +89,7 @@ describe('tail Node', function() {
|
||||
});
|
||||
|
||||
it('should handle a non-existent file', function(done) {
|
||||
fs.unlinkSync(fileToTail);
|
||||
fs.writeFileSync(fileToTail, "Tail message line.\n");
|
||||
var flow = [{id:"tailNode1", type:"tail", name: "tailNode", "split":true, "filename":fileToTail, "wires":[["helperNode1"]]},
|
||||
{id:"helperNode1", type:"helper", wires:[]}];
|
||||
helper.load(tailNode, flow, function() {
|
||||
@@ -100,9 +100,12 @@ describe('tail Node', function() {
|
||||
msg.payload.should.equal("Tail message line");
|
||||
done();
|
||||
});
|
||||
setTimeout(function(){
|
||||
fs.unlinkSync(fileToTail);
|
||||
},500);
|
||||
setTimeout( function() {
|
||||
fs.writeFile(fileToTail, "Tail message line\n");
|
||||
},wait);
|
||||
},1000);
|
||||
});
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user