Skip to content

Commit 0e2cac4

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

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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)