Skip to content

Commit fc67f26

Browse files
committed
chore: add test coverage
1 parent 7799e69 commit fc67f26

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

packages/common/test/search/Catalog.test.ts

+14
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,20 @@ describe("Catalog Class:", () => {
271271
const teamsCollection = instance.getCollection("teams");
272272
expect(teamsCollection.scope.filters.length).toBe(1);
273273
});
274+
it("get collection works without collection scope filters", () => {
275+
const instance = Catalog.fromJson(cloneObject(catalogJson), context);
276+
instance.addCollection({
277+
key: "documents",
278+
label: "Documents",
279+
targetEntity: "item",
280+
scope: {
281+
targetEntity: "item",
282+
collection: "document",
283+
} as IQuery,
284+
});
285+
const docCollection = instance.getCollection("documents");
286+
expect(docCollection.scope.filters.length).toBe(1);
287+
});
274288
});
275289
describe("addCollection", () => {
276290
const newCollection = {

0 commit comments

Comments
 (0)