fix(core): update

This commit is contained in:
2021-11-12 18:04:08 +01:00
parent 3f11cbf595
commit 7b33347b4c
3 changed files with 15 additions and 27 deletions

View File

@@ -19,7 +19,7 @@ let testDb: smartdata.SmartdataDb;
let smartdataOptions: smartdata.IMongoDescriptor;
let mongod: mongoPlugin.MongoMemoryServer;
tap.skip.test('should create a testinstance as database', async () => {
tap.test('should create a testinstance as database', async () => {
mongod = await mongoPlugin.MongoMemoryServer.create();
console.log('created mongod instance');
console.log('mongod started');
@@ -31,12 +31,13 @@ tap.skip.test('should create a testinstance as database', async () => {
await testDb.init();
});
tap.test('should connect to atlas', async (tools) => {
tap.skip.test('should connect to atlas', async (tools) => {
const databaseName = `test-smartdata-${smartunique.shortId()}`;
testDb = new smartdata.SmartdataDb({
mongoDbUrl: testQenv.getEnvVarOnDemand('MONGO_URL'),
mongoDbName: databaseName,
});
await testDb.init();
});
let easyStore: smartdata.EasyStore<{
@@ -52,11 +53,8 @@ tap.test('should create an easystore', async () => {
});
tap.test('close', async () => {
testDb.close();
mongod.stop();
setTimeout(() => {
process.exit(0);
}, 1000);
await mongod.stop();
await testDb.close();
});
tap.start();