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'} ]);
|
flows.should.eql([ 'C', { ghi: 'jkl', fn: 'file2.js' }, {fn:'flow.json'} ]);
|
||||||
var ft = path.join("B","D","file3.js");
|
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.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) {
|
setTimeout(function() {
|
||||||
flows.should.eql([ { mno: 'pqr', fn: 'file3.js' } ]);
|
localfilesystem.getLibraryEntry('object',path.join("B","D")).then(function(flows) {
|
||||||
localfilesystem.getLibraryEntry('object',ft).then(function(body) {
|
flows.should.eql([ { mno: 'pqr', fn: 'file3.js' } ]);
|
||||||
body.should.eql("// another non meta line\n\n Hi There");
|
localfilesystem.getLibraryEntry('object',ft).then(function(body) {
|
||||||
done();
|
body.should.eql("// another non meta line\n\n Hi There");
|
||||||
|
done();
|
||||||
|
}).otherwise(function(err) {
|
||||||
|
done(err);
|
||||||
|
});
|
||||||
}).otherwise(function(err) {
|
}).otherwise(function(err) {
|
||||||
done(err);
|
done(err);
|
||||||
});
|
})}
|
||||||
}).otherwise(function(err) {
|
, 50);
|
||||||
done(err);
|
|
||||||
});
|
|
||||||
}).otherwise(function(err) {
|
}).otherwise(function(err) {
|
||||||
done(err);
|
done(err);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user