app-next: fix app test
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -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(<App />);
|
||||
const { default: app } = await import('./App');
|
||||
const rendered = await renderWithEffects(app);
|
||||
expect(rendered.baseElement).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user