describe('connect to MongoDB()', () => { it('should connect to MongoDB and ', () => { return database.getDatabase().then((db) => { assert.notEqual(db, null); const bucket = new mongodb.GridFSBucket(db, { bucketName: 'tracks', }); assert.notEqual(bucket, null); }).catch((err) => { assert.equal(err, null); }); }).timeout(3000); });
mocha.run() .on('test', function(test) { console.log('Test started: ' + test.title); }) .on('test end', function(test) { console.log('Test ended: ' + test.title); }) .on('pass', function(test) { console.log('Test passed'); }) .on('fail', function(test, err) { console.log('Test failed'); console.log(test); console.log(err); }) .on('end', function() { console.log('All tests done'); });