fix(core): update

This commit is contained in:
2022-11-01 18:23:57 +01:00
parent 64005a0b32
commit 3f28ff80cb
13 changed files with 5422 additions and 15248 deletions

View File

@ -42,14 +42,14 @@ class House extends smartdata.SmartDataDbDoc<House, House> {
@smartdata.svDb()
public data = {
id: smartunique.shortId(),
hello: 'hello'
}
hello: 'hello',
};
}
tap.test('should watch a collection', async (toolsArg) => {
const done = toolsArg.defer();
const watcher = await House.watch({});
watcher.changeSubject.subscribe(async houseArg => {
watcher.changeSubject.subscribe(async (houseArg) => {
console.log('hey there, we observed a house');
await watcher.close();
done.resolve();
@ -58,7 +58,7 @@ tap.test('should watch a collection', async (toolsArg) => {
await newHouse.save();
console.log('saved a house');
await done.promise;
})
});
// =======================================
// close the database connection
@ -71,4 +71,4 @@ tap.test('close', async () => {
}
});
tap.start({ throwOnError: true });
tap.start({ throwOnError: true });