From cd2eed66d762a1581ff9e920b0affbfcb0de27ef Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Fri, 8 Sep 2023 16:40:28 +0200 Subject: [PATCH] app-next: fix app test Signed-off-by: Patrik Oldsberg --- packages/app-next/src/App.test.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/app-next/src/App.test.tsx b/packages/app-next/src/App.test.tsx index 047c9821b5..b3cef58fe1 100644 --- a/packages/app-next/src/App.test.tsx +++ b/packages/app-next/src/App.test.tsx @@ -14,9 +14,13 @@ * limitations under the License. */ -import React from 'react'; import { renderWithEffects } from '@backstage/test-utils'; +jest.mock('@backstage/plugin-graphiql', () => ({ + ...jest.requireActual('@backstage/plugin-graphiql'), + GraphiQLIcon: () => null, +})); + describe('App', () => { it('should render', async () => { process.env = { @@ -41,8 +45,8 @@ describe('App', () => { ] as any, }; - const { default: App } = await import('./App'); - const rendered = await renderWithEffects(); + const { default: app } = await import('./App'); + const rendered = await renderWithEffects(app); expect(rendered.baseElement).toBeInTheDocument(); }); });