|
|
@@ -46,8 +46,13 @@ describe('Test for Crowi application context', function () {
|
|
|
p.then(function() {
|
|
|
expect(mongoose.connection.readyState).to.equals(1);
|
|
|
done();
|
|
|
- }).catch(function() {
|
|
|
- expect(mongoose.connection.readyState).to.equals(1);
|
|
|
+ }).catch(function(err) {
|
|
|
+ //console.log('readyState', mongoose.connection.readyState);
|
|
|
+ if (mongoose.connection.readyState === 2 || mongoose.connection.readyState === 1) { // alreaady connected
|
|
|
+ // throught
|
|
|
+ } else {
|
|
|
+ expect(mongoose.connection.readyState).to.equals(0);
|
|
|
+ }
|
|
|
done();
|
|
|
});
|
|
|
});
|