Skip to content

Commit

Permalink
chore: add test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
juliannemarik committed Feb 26, 2025
1 parent 7799e69 commit fc67f26
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions packages/common/test/search/Catalog.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit fc67f26

Please sign in to comment.