Merge pull request #27070 from backstage/freben/catalog-expect-too

rewrite some more tests to use actual fake catalog instead of mock
This commit is contained in:
Fredrik Adelöw
2024-10-21 15:44:32 +02:00
committed by GitHub
10 changed files with 144 additions and 179 deletions
@@ -59,7 +59,8 @@ describe('CachedEntityLoader', () => {
});
it('returns entities from cache', async () => {
const catalog = catalogServiceMock.mock();
const catalog = catalogServiceMock();
jest.spyOn(catalog, 'getEntityByRef');
cache.get.mockResolvedValue(entity);
const loader = new CachedEntityLoader({ catalog, cache });