From fc67f265ba1fbd71a704583059444e02b7db7542 Mon Sep 17 00:00:00 2001 From: juliannemarik Date: Wed, 26 Feb 2025 16:35:01 -0600 Subject: [PATCH] chore: add test coverage --- packages/common/test/search/Catalog.test.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/packages/common/test/search/Catalog.test.ts b/packages/common/test/search/Catalog.test.ts index 85e78ed8153..26089778535 100644 --- a/packages/common/test/search/Catalog.test.ts +++ b/packages/common/test/search/Catalog.test.ts @@ -271,6 +271,20 @@ describe("Catalog Class:", () => { const teamsCollection = instance.getCollection("teams"); expect(teamsCollection.scope.filters.length).toBe(1); }); + it("get collection works without collection scope filters", () => { + const instance = Catalog.fromJson(cloneObject(catalogJson), context); + instance.addCollection({ + key: "documents", + label: "Documents", + targetEntity: "item", + scope: { + targetEntity: "item", + collection: "document", + } as IQuery, + }); + const docCollection = instance.getCollection("documents"); + expect(docCollection.scope.filters.length).toBe(1); + }); }); describe("addCollection", () => { const newCollection = {