fix(core): update
This commit is contained in:
@ -19,7 +19,6 @@ let testDb: smartdata.SmartdataDb;
|
||||
let smartdataOptions: smartdata.IMongoDescriptor;
|
||||
let mongod: mongoPlugin.MongoMemoryServer;
|
||||
|
||||
|
||||
tap.test('should create a testinstance as database', async () => {
|
||||
mongod = new mongoPlugin.MongoMemoryServer({});
|
||||
console.log('created mongod instance');
|
||||
@ -47,14 +46,14 @@ tap.test('should create an easystore', async () => {
|
||||
await easyStore.writeKey('key1', 'hello');
|
||||
const retrievedKey = await easyStore.readKey('key1');
|
||||
expect(retrievedKey).to.equal('hello');
|
||||
})
|
||||
});
|
||||
|
||||
tap.test('close', async () => {
|
||||
testDb.close();
|
||||
mongod.stop();
|
||||
setTimeout(() => {
|
||||
process.exit(0);
|
||||
}, 1000)
|
||||
})
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
tap.start();
|
||||
tap.start();
|
||||
|
@ -134,7 +134,7 @@ tap.test('expect to get instance of Car with deep match', async () => {
|
||||
const timeStart = Date.now();
|
||||
const myCars2 = await Car.getInstances({
|
||||
deepData: {
|
||||
sodeep: 'yes'
|
||||
sodeep: 'yes',
|
||||
},
|
||||
});
|
||||
if (counter % 10 === 0) {
|
||||
@ -207,7 +207,7 @@ tap.test('should store a new Truck', async () => {
|
||||
console.log(myTruck2);
|
||||
});
|
||||
|
||||
tap.test('should ', async () => {})
|
||||
tap.test('should ', async () => {});
|
||||
|
||||
// =======================================
|
||||
// close the database connection
|
||||
|
@ -80,7 +80,7 @@ class Car extends smartdata.SmartDataDbDoc<Car, Car> {
|
||||
}
|
||||
|
||||
const createCarClass = (dbArg: smartdata.SmartdataDb) => {
|
||||
smartdata.setDefaultManagerForDoc({db: dbArg}, Car);
|
||||
smartdata.setDefaultManagerForDoc({ db: dbArg }, Car);
|
||||
return Car;
|
||||
};
|
||||
|
||||
@ -92,9 +92,9 @@ tap.test('should produce a car', async () => {
|
||||
|
||||
tap.test('should get a car', async () => {
|
||||
const car = Car.getInstance({
|
||||
color: 'red'
|
||||
})
|
||||
})
|
||||
color: 'red',
|
||||
});
|
||||
});
|
||||
|
||||
// =======================================
|
||||
// close the database connection
|
||||
|
Reference in New Issue
Block a user