Explicitly wrap in ContainerProvider when calling renderWithStore

This commit is contained in:
Alejandro Celaya
2025-11-24 09:11:06 +01:00
parent 514162964d
commit d11358af59
12 changed files with 43 additions and 65 deletions

View File

@@ -1,9 +1,7 @@
import { screen } from '@testing-library/react';
import { fromPartial } from '@total-typescript/shoehorn';
import { createMemoryHistory } from 'history';
import { Router } from 'react-router';
import { MainHeader } from '../../src/common/MainHeader';
import { ContainerProvider } from '../../src/container/context';
import { checkAccessibility } from '../__helpers__/accessibility';
import { renderWithStore } from '../__helpers__/setUpTest';
@@ -14,9 +12,7 @@ describe('<MainHeader />', () => {
return renderWithStore(
<Router location={history.location} navigator={history}>
<ContainerProvider value={fromPartial({ buildShlinkApiClient: vi.fn() })}>
<MainHeader />
</ContainerProvider>
<MainHeader />
</Router>,
);
};