mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Add wait for writing a library entry into a file. (#1186)
This commit is contained in:
parent
7a10636128
commit
3658d0e039
@ -589,17 +589,19 @@ describe('LocalFileSystem', function() {
|
||||
flows.should.eql([ 'C', { ghi: 'jkl', fn: 'file2.js' }, {fn:'flow.json'} ]);
|
||||
var ft = path.join("B","D","file3.js");
|
||||
localfilesystem.saveLibraryEntry('object',ft,{mno:'pqr'},"// another non meta line\n\n Hi There").then(function() {
|
||||
localfilesystem.getLibraryEntry('object',path.join("B","D")).then(function(flows) {
|
||||
flows.should.eql([ { mno: 'pqr', fn: 'file3.js' } ]);
|
||||
localfilesystem.getLibraryEntry('object',ft).then(function(body) {
|
||||
body.should.eql("// another non meta line\n\n Hi There");
|
||||
done();
|
||||
setTimeout(function() {
|
||||
localfilesystem.getLibraryEntry('object',path.join("B","D")).then(function(flows) {
|
||||
flows.should.eql([ { mno: 'pqr', fn: 'file3.js' } ]);
|
||||
localfilesystem.getLibraryEntry('object',ft).then(function(body) {
|
||||
body.should.eql("// another non meta line\n\n Hi There");
|
||||
done();
|
||||
}).otherwise(function(err) {
|
||||
done(err);
|
||||
});
|
||||
}).otherwise(function(err) {
|
||||
done(err);
|
||||
});
|
||||
}).otherwise(function(err) {
|
||||
done(err);
|
||||
});
|
||||
})}
|
||||
, 50);
|
||||
}).otherwise(function(err) {
|
||||
done(err);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user