Merge pull request #14618 from backstage/freben/catalog-client-tests

update tests to be more robust against catalog-client changes
This commit is contained in:
Fredrik Adelöw
2022-11-15 14:35:46 +01:00
committed by GitHub
13 changed files with 269 additions and 224 deletions
@@ -15,21 +15,16 @@
*/
import { Entity } from '@backstage/catalog-model';
import {
CatalogApi,
catalogApiRef,
entityRouteRef,
} from '@backstage/plugin-catalog-react';
import { catalogApiRef, entityRouteRef } from '@backstage/plugin-catalog-react';
import { renderInTestApp, TestApiProvider } from '@backstage/test-utils';
import React from 'react';
import { FossaApi, fossaApiRef } from '../../api';
import { FossaPage } from './FossaPage';
describe('<FossaPage />', () => {
const catalogApi: jest.Mocked<CatalogApi> = {
const catalogApi = {
addLocation: jest.fn(),
getEntities: jest.fn(),
getEntityByRef: jest.fn(),
getLocationByRef: jest.fn(),
getLocationById: jest.fn(),
removeEntityByUid: jest.fn(),