mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Fix the test cases which sometimes fails due to timing. (#1228)
This commit is contained in:
committed by
Nick O'Leary
parent
c54cf26848
commit
05878d3176
@@ -134,12 +134,14 @@ describe('LocalFileSystem', function() {
|
||||
fs.existsSync(flowFileBackupPath).should.be.false();
|
||||
fs.writeFileSync(flowFileBackupPath,JSON.stringify(testFlow));
|
||||
fs.existsSync(flowFileBackupPath).should.be.true();
|
||||
localfilesystem.getFlows().then(function(flows) {
|
||||
flows.should.eql(testFlow);
|
||||
done();
|
||||
}).otherwise(function(err) {
|
||||
done(err);
|
||||
});
|
||||
setTimeout(function() {
|
||||
localfilesystem.getFlows().then(function(flows) {
|
||||
flows.should.eql(testFlow);
|
||||
done();
|
||||
}).otherwise(function(err) {
|
||||
done(err);
|
||||
});
|
||||
},50);
|
||||
}).otherwise(function(err) {
|
||||
done(err);
|
||||
});
|
||||
|
Reference in New Issue
Block a user