fix(core): update

This commit is contained in:
2024-04-14 01:24:21 +02:00
parent cfe733621f
commit 30ae641a9c
5 changed files with 24 additions and 7 deletions

View File

@ -105,7 +105,7 @@ tap.test('should elect only one leader amongst multiple instances', async (tools
});
tap.test('should clean up', async () => {
await smartmongoInstance.stopAndDumpToDir(`.nogit/testdata/`);
await smartmongoInstance.stopAndDumpToDir(`.nogit/dbdump/test.distributedcoordinator.ts`);
setTimeout(() => process.exit(), 2000);
})

View File

@ -75,7 +75,7 @@ class Car extends smartdata.SmartDataDbDoc<Car, Car> {
tap.test('should create a new id', async () => {
const newid = await Car.getNewId();
console.log(newid);
})
});
tap.test('should save the car to the db', async (toolsArg) => {
const myCar = new Car('red', 'Volvo');
@ -218,11 +218,13 @@ tap.test('should use a cursor', async () => {
// close the database connection
// =======================================
tap.test('close', async () => {
await testDb.mongoDb.dropDatabase();
await testDb.close();
if (smartmongoInstance) {
await smartmongoInstance.stop();
await smartmongoInstance.stopAndDumpToDir('./.nogit/dbdump/test.ts');
} else {
await testDb.mongoDb.dropDatabase();
await testDb.close();
}
setTimeout(() => process.exit(), 2000);
});
tap.start({ throwOnError: true });