mock scmIntegrationsApi
Signed-off-by: Anders Näsman <andersn@spotify.com>
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
"@backstage/core-components": "^0.9.3",
|
||||
"@backstage/core-app-api": "^1.0.1",
|
||||
"@backstage/core-plugin-api": "^1.0.1",
|
||||
"@backstage/integration-react": "^1.1.0-next.0",
|
||||
"@backstage/plugin-catalog": "^1.2.0-next.0",
|
||||
"@backstage/plugin-search-react": "^0.1.1-next.0",
|
||||
"@backstage/plugin-techdocs": "^1.1.1-next.0",
|
||||
|
||||
@@ -37,6 +37,7 @@ import {
|
||||
import { TechDocsReaderPage, techdocsPlugin } from '@backstage/plugin-techdocs';
|
||||
import { catalogPlugin } from '@backstage/plugin-catalog';
|
||||
import { searchApiRef } from '@backstage/plugin-search-react';
|
||||
import { scmIntegrationsApiRef } from '@backstage/integration-react';
|
||||
|
||||
const techdocsApi = {
|
||||
getTechDocsMetadata: jest.fn(),
|
||||
@@ -53,6 +54,10 @@ const searchApi = {
|
||||
query: jest.fn().mockResolvedValue({ results: [] }),
|
||||
};
|
||||
|
||||
const scmIntegrationsApi = {
|
||||
fromConfig: jest.fn().mockReturnValue({}),
|
||||
};
|
||||
|
||||
/** @ignore */
|
||||
type TechDocsAddonTesterTestApiPair<TApi> = TApi extends infer TImpl
|
||||
? readonly [ApiRef<TApi>, Partial<TImpl>]
|
||||
@@ -151,6 +156,7 @@ export class TechDocsAddonTester {
|
||||
[techdocsApiRef, techdocsApi],
|
||||
[techdocsStorageApiRef, techdocsStorageApi],
|
||||
[searchApiRef, searchApi],
|
||||
[scmIntegrationsApiRef, scmIntegrationsApi],
|
||||
...this.options.apis,
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user