diff --git a/packages/cli/templates/default-plugin/src/components/ExampleComponent/ExampleComponent.test.tsx.hbs b/packages/cli/templates/default-plugin/src/components/ExampleComponent/ExampleComponent.test.tsx.hbs index e6eab17493..0044b67a37 100644 --- a/packages/cli/templates/default-plugin/src/components/ExampleComponent/ExampleComponent.test.tsx.hbs +++ b/packages/cli/templates/default-plugin/src/components/ExampleComponent/ExampleComponent.test.tsx.hbs @@ -1,11 +1,10 @@ import React from 'react'; -import { render } from '@testing-library/react'; import { ExampleComponent } from './ExampleComponent'; import { ThemeProvider } from '@material-ui/core'; import { lightTheme } from '@backstage/theme'; import { rest } from 'msw'; import { setupServer } from 'msw/node'; -import { msw } from '@backstage/test-utils'; +import { msw, renderInTestApp } from '@backstage/test-utils'; describe('ExampleComponent', () => { const server = setupServer(); @@ -19,8 +18,8 @@ describe('ExampleComponent', () => { ); }); - it('should render', () => { - const rendered = render( + it('should render', async () => { + const rendered = await renderInTestApp( ,