From bc5f551fc56a5ae25f7ddf0fcd63526173a3f550 Mon Sep 17 00:00:00 2001 From: Andrey Platov Date: Thu, 5 Aug 2021 09:48:17 +0200 Subject: [PATCH] add search for undefined _id test Signed-off-by: Andrey Platov --- packages/core/src/__tests__/memdb.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/core/src/__tests__/memdb.test.ts b/packages/core/src/__tests__/memdb.test.ts index 8f508eacfe..56def38107 100644 --- a/packages/core/src/__tests__/memdb.test.ts +++ b/packages/core/src/__tests__/memdb.test.ts @@ -13,7 +13,7 @@ // limitations under the License. // -import type { Class, Doc, Obj, Ref } from '../classes' +import type { Class, Obj, Ref } from '../classes' import core from '../component' import { Hierarchy } from '../hierarchy' import { ModelDb, TxDb } from '../memdb' @@ -39,9 +39,9 @@ describe('memdb', () => { const model = new ModelDb(hierarchy) for (const tx of txes) await model.tx(tx) const result = await model.findAll(core.class.Class, {}) - expect(result.length).toBeGreaterThan(5) - const result2 = await model.findAll('class:workbench.Application' as Ref>, { _id: undefined }) - expect(result2).toHaveLength(0) + expect(result.length).toBe(9) + const result2 = await model.findAll(core.class.Class, { _id: undefined }) + expect(result2.length).toBe(0) }) it('should allow delete', async () => {