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

Make all tail node test writres are sync

This commit is contained in:
Dave C-J 2014-08-27 09:51:30 +01:00
parent c38aa91a4d
commit df751be331

View File

@ -26,9 +26,7 @@ describe('TailNode', function() {
var resourcesDir = path.join(__dirname,"..","..","..","resources"); var resourcesDir = path.join(__dirname,"..","..","..","resources");
var fileToTail = path.join(resourcesDir,"28-tail-test-file.txt"); var fileToTail = path.join(resourcesDir,"28-tail-test-file.txt");
fs.writeFile(fileToTail, "Tail message line 1\nTail message line 2\n", function (err) { fs.writeFileSync(fileToTail, "Tail message line 1\nTail message line 2\n");
if (err) { console.log('cannot write to '+fileToTail); }
});
beforeEach(function(done) { beforeEach(function(done) {
helper.startServer(done); helper.startServer(done);
@ -79,7 +77,7 @@ describe('TailNode', function() {
msg.payload.should.equal("Tail message line 5\nTail message line 6\n"); msg.payload.should.equal("Tail message line 5\nTail message line 6\n");
done(); done();
}); });
fs.appendFile(fileToTail, "Tail message line 5\nTail message line 6\n"); fs.appendFileSync(fileToTail, "Tail message line 5\nTail message line 6\n");
}); });
}); });