update tests to be more robust against catalog-client changes

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2022-11-14 16:50:17 +01:00
parent 68360a5fc6
commit 9bafcfc209
13 changed files with 269 additions and 224 deletions
@@ -58,7 +58,7 @@ function mockCatalogClient(entity?: Entity): jest.Mocked<CatalogApi> {
if (entity) {
mock.getEntityByRef.mockReturnValue(entity);
}
return mock;
return mock as Partial<jest.Mocked<CatalogApi>> as jest.Mocked<CatalogApi>;
}
function mockTodoReader(items?: TodoItem[]): jest.Mocked<TodoReader> {