diff --git a/plugins/pagerduty/src/components/PagerDutyCard/index.test.tsx b/plugins/pagerduty/src/components/PagerDutyCard/index.test.tsx index 041f76fb8c..fbb19c9897 100644 --- a/plugins/pagerduty/src/components/PagerDutyCard/index.test.tsx +++ b/plugins/pagerduty/src/components/PagerDutyCard/index.test.tsx @@ -20,28 +20,12 @@ import { Entity } from '@backstage/catalog-model'; import { EntityProvider } from '@backstage/plugin-catalog-react'; import { NotFoundError } from '@backstage/errors'; import { TestApiRegistry, wrapInTestApp } from '@backstage/test-utils'; -import { - pagerDutyApiRef, - UnauthorizedError, - PagerDutyClient, -} from '../../api'; +import { pagerDutyApiRef, UnauthorizedError, PagerDutyClient } from '../../api'; import { Service, User } from '../types'; import { alertApiRef } from '@backstage/core-plugin-api'; import { ApiProvider } from '@backstage/core-app-api'; -const mockPagerDutyApi: Partial = { - getServiceByIntegrationKey: async () => [], - getServiceByServiceId: async () => service, - getOnCallByPolicyId: async () => [], - getIncidentsByServiceId: async () => [], -}; - -const apis = TestApiRegistry.from( - [pagerDutyApiRef, mockPagerDutyApi], - [alertApiRef, {}], -); - const entity: Entity = { apiVersion: 'backstage.io/v1alpha1', kind: 'Component', @@ -105,6 +89,18 @@ const service: Service = { integrationKey: 'abc123', }; +const mockPagerDutyApi: Partial = { + getServiceByIntegrationKey: async () => [], + getServiceByServiceId: async () => service, + getOnCallByPolicyId: async () => [], + getIncidentsByServiceId: async () => [], +}; + +const apis = TestApiRegistry.from( + [pagerDutyApiRef, mockPagerDutyApi], + [alertApiRef, {}], +); + describe('isPluginApplicableToEntity', () => { describe('when entity has no annotations', () => { it('returns false', () => {