mirror of
https://github.com/grafana/grafana.git
synced 2025-08-03 04:22:13 +08:00
Chore: Log error from App loading in console and faro (#79977)
* Chore: Log error from App loading in console and faro * Add error spy for console
This commit is contained in:
@ -103,9 +103,12 @@ describe('AppRootPage', () => {
|
||||
});
|
||||
|
||||
it("should show a not found page if the plugin settings can't load", async () => {
|
||||
jest.spyOn(console, 'error').mockImplementation();
|
||||
getPluginSettingsMock.mockRejectedValue(new Error('Unknown Plugin'));
|
||||
// Renders once for the first time
|
||||
await renderUnderRouter();
|
||||
await act(async () => {
|
||||
await renderUnderRouter();
|
||||
});
|
||||
expect(await screen.findByText('App not found')).toBeVisible();
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user