From 5633b9a710135d9b364bb0ed85baeb9bedfccc37 Mon Sep 17 00:00:00 2001 From: Chanwit Kaewkasi Date: Sun, 31 May 2020 20:49:05 +0700 Subject: [PATCH] fix failure test --- .../components/ProfileCatalog/ProfileCatalog.test.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/gitops-profiles/src/components/ProfileCatalog/ProfileCatalog.test.tsx b/plugins/gitops-profiles/src/components/ProfileCatalog/ProfileCatalog.test.tsx index a1633e0858..d7e65c2a26 100644 --- a/plugins/gitops-profiles/src/components/ProfileCatalog/ProfileCatalog.test.tsx +++ b/plugins/gitops-profiles/src/components/ProfileCatalog/ProfileCatalog.test.tsx @@ -20,13 +20,20 @@ import mockFetch from 'jest-fetch-mock'; import ProfileCatalog from './ProfileCatalog'; import { ThemeProvider } from '@material-ui/core'; import { lightTheme } from '@backstage/theme'; +import { ApiProvider, ApiRegistry } from '@backstage/core-api'; +import { gitOpsApiRef, GitOpsRestApi } from '../../api'; describe('ProfileCatalog', () => { it('should render', () => { + const apis = ApiRegistry.from([ + [gitOpsApiRef, new GitOpsRestApi('http://localhost:3008')], + ]); mockFetch.mockResponse(() => new Promise(() => {})); const rendered = render( - + + + , ); expect(