Fixup all the tests

This commit is contained in:
Nick O'Leary
2018-04-24 15:01:49 +01:00
parent 34832d5942
commit 5d064aa1d7
50 changed files with 3480 additions and 1762 deletions

View File

@@ -47,7 +47,7 @@ describe('storage/localfilesystem', function() {
fs.existsSync(path.join(userDir,"lib")).should.be.true();
fs.existsSync(path.join(userDir,"lib",'flows')).should.be.true();
done();
}).otherwise(function(err) {
}).catch(function(err) {
done(err);
});
});
@@ -70,7 +70,7 @@ describe('storage/localfilesystem', function() {
} finally {
process.env.NODE_RED_HOME = oldNRH;
}
}).otherwise(function(err) {
}).catch(function(err) {
done(err);
});
});
@@ -96,7 +96,7 @@ describe('storage/localfilesystem', function() {
process.env.NODE_RED_HOME = oldNRH;
process.env.NODE_HOMEPATH = oldHOMEPATH;
}
}).otherwise(function(err) {
}).catch(function(err) {
done(err);
});
});
@@ -124,7 +124,7 @@ describe('storage/localfilesystem', function() {
process.env.HOME = oldHOME;
process.env.HOMEPATH = oldHOMEPATH;
}
}).otherwise(function(err) {
}).catch(function(err) {
done(err);
});
});
@@ -155,7 +155,7 @@ describe('storage/localfilesystem', function() {
process.env.HOMEPATH = oldHOMEPATH;
process.env.USERPROFILE = oldUSERPROFILE;
}
}).otherwise(function(err) {
}).catch(function(err) {
done(err);
});
});
@@ -168,10 +168,10 @@ describe('storage/localfilesystem', function() {
localfilesystem.getFlows().then(function(flows) {
flows.should.eql([]);
done();
}).otherwise(function(err) {
}).catch(function(err) {
done(err);
});
}).otherwise(function(err) {
}).catch(function(err) {
done(err);
});
});
@@ -186,10 +186,10 @@ describe('storage/localfilesystem', function() {
localfilesystem.getFlows().then(function(flows) {
flows.should.eql([]);
done();
}).otherwise(function(err) {
}).catch(function(err) {
done(err);
});
}).otherwise(function(err) {
}).catch(function(err) {
done(err);
});
});
@@ -208,11 +208,11 @@ describe('storage/localfilesystem', function() {
localfilesystem.getFlows().then(function(flows) {
flows.should.eql(testFlow);
done();
}).otherwise(function(err) {
}).catch(function(err) {
done(err);
});
},50);
}).otherwise(function(err) {
}).catch(function(err) {
done(err);
});
});
@@ -230,13 +230,13 @@ describe('storage/localfilesystem', function() {
localfilesystem.getFlows().then(function(flows) {
flows.should.eql(testFlow);
done();
}).otherwise(function(err) {
}).catch(function(err) {
done(err);
});
}).otherwise(function(err) {
}).catch(function(err) {
done(err);
});
}).otherwise(function(err) {
}).catch(function(err) {
done(err);
});
});
@@ -257,13 +257,13 @@ describe('storage/localfilesystem', function() {
localfilesystem.getFlows().then(function(flows) {
flows.should.eql(testFlow);
done();
}).otherwise(function(err) {
}).catch(function(err) {
done(err);
});
}).otherwise(function(err) {
}).catch(function(err) {
done(err);
});
}).otherwise(function(err) {
}).catch(function(err) {
done(err);
});
});
@@ -278,13 +278,13 @@ describe('storage/localfilesystem', function() {
localfilesystem.getFlows().then(function(flows) {
flows.should.eql(testFlow);
done();
}).otherwise(function(err) {
}).catch(function(err) {
done(err);
});
}).otherwise(function(err) {
}).catch(function(err) {
done(err);
});
}).otherwise(function(err) {
}).catch(function(err) {
done(err);
});
});
@@ -298,11 +298,11 @@ describe('storage/localfilesystem', function() {
fs.fsync.callCount.should.be.greaterThan(0);
fs.fsync.restore();
done();
}).otherwise(function(err) {
}).catch(function(err) {
fs.fsync.restore();
done(err);
});
}).otherwise(function(err) {
}).catch(function(err) {
done(err);
});
});
@@ -321,10 +321,10 @@ describe('storage/localfilesystem', function() {
fs.fsync.callCount.should.be.greaterThan(0);
fs.fsync.restore();
done();
}).otherwise(function(err) {
}).catch(function(err) {
done(err);
});
}).otherwise(function(err) {
}).catch(function(err) {
done(err);
});
});
@@ -358,14 +358,14 @@ describe('storage/localfilesystem', function() {
content2.should.not.equal(backupContent);
done();
}).otherwise(function(err) {
}).catch(function(err) {
done(err);
});
}).otherwise(function(err) {
}).catch(function(err) {
done(err);
});
}).otherwise(function(err) {
}).catch(function(err) {
done(err);
});
@@ -382,10 +382,10 @@ describe('storage/localfilesystem', function() {
localfilesystem.getCredentials().then(function(creds) {
creds.should.eql({});
done();
}).otherwise(function(err) {
}).catch(function(err) {
done(err);
});
}).otherwise(function(err) {
}).catch(function(err) {
done(err);
});
});
@@ -406,13 +406,13 @@ describe('storage/localfilesystem', function() {
localfilesystem.getCredentials().then(function(creds) {
creds.should.eql(credentials);
done();
}).otherwise(function(err) {
}).catch(function(err) {
done(err);
});
}).otherwise(function(err) {
}).catch(function(err) {
done(err);
});
}).otherwise(function(err) {
}).catch(function(err) {
done(err);
});
});
@@ -437,10 +437,10 @@ describe('storage/localfilesystem', function() {
fs.existsSync(credFile).should.be.true();
fs.existsSync(credFileBackup).should.be.true();
done();
}).otherwise(function(err) {
}).catch(function(err) {
done(err);
});
}).otherwise(function(err) {
}).catch(function(err) {
done(err);
});
});
@@ -463,13 +463,13 @@ describe('storage/localfilesystem', function() {
localfilesystem.getCredentials().then(function(creds) {
creds.should.eql(credentials);
done();
}).otherwise(function(err) {
}).catch(function(err) {
done(err);
});
}).otherwise(function(err) {
}).catch(function(err) {
done(err);
});
}).otherwise(function(err) {
}).catch(function(err) {
done(err);
});
});

View File

@@ -38,7 +38,7 @@ describe('storage/localfilesystem/sessions', function() {
localfilesystemSessions.getSessions().then(function(sessions) {
sessions.should.eql({});
done();
}).otherwise(function(err) {
}).catch(function(err) {
done(err);
});
});
@@ -51,7 +51,7 @@ describe('storage/localfilesystem/sessions', function() {
localfilesystemSessions.getSessions().then(function(sessions) {
sessions.should.eql({});
done();
}).otherwise(function(err) {
}).catch(function(err) {
done(err);
});
});
@@ -69,10 +69,10 @@ describe('storage/localfilesystem/sessions', function() {
localfilesystemSessions.getSessions().then(function(_sessions) {
_sessions.should.eql(sessions);
done();
}).otherwise(function(err) {
}).catch(function(err) {
done(err);
});
}).otherwise(function(err) {
}).catch(function(err) {
done(err);
});
});

View File

@@ -39,7 +39,7 @@ describe('storage/localfilesystem/settings', function() {
localfilesystemSettings.getSettings().then(function(settings) {
settings.should.eql({});
done();
}).otherwise(function(err) {
}).catch(function(err) {
done(err);
});
});
@@ -52,7 +52,7 @@ describe('storage/localfilesystem/settings', function() {
localfilesystemSettings.getSettings().then(function(settings) {
settings.should.eql({});
done();
}).otherwise(function(err) {
}).catch(function(err) {
done(err);
});
});
@@ -70,10 +70,10 @@ describe('storage/localfilesystem/settings', function() {
localfilesystemSettings.getSettings().then(function(_settings) {
_settings.should.eql(settings);
done();
}).otherwise(function(err) {
}).catch(function(err) {
done(err);
});
}).otherwise(function(err) {
}).catch(function(err) {
done(err);
});
});