diff --git a/src/layouts/BaseLayout/BaseLayout.test.tsx b/src/layouts/BaseLayout/BaseLayout.test.tsx index 714a8e8dad..05fb57499b 100644 --- a/src/layouts/BaseLayout/BaseLayout.test.tsx +++ b/src/layouts/BaseLayout/BaseLayout.test.tsx @@ -595,14 +595,14 @@ describe('BaseLayout', () => { }) describe('When Header has a network call error', async () => { - it.only('renders the EmptyErrorComponent when header throws an error', async () => { - vi.doMock('./Header', () => ({ + it('renders the EmptyErrorComponent when header throws an error', async () => { + vi.mock('layouts/Header', () => ({ default: () => { - throw new Error('Header Error') + throw new Error('Simulated Header Error') }, })) - const { default: BaseLayout } = await import('./BaseLayout') - setup({ currentUser: loggedInUser }) + + setup({ currentUser: userHasDefaultOrg }) render(hello, { wrapper: wrapper() }) const header = screen.queryByText(/Header/)