mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-05-27 07:36:34 +00:00
Expose container via provider
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
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';
|
||||
|
||||
@@ -12,7 +14,9 @@ describe('<MainHeader />', () => {
|
||||
|
||||
return renderWithStore(
|
||||
<Router location={history.location} navigator={history}>
|
||||
<MainHeader />
|
||||
<ContainerProvider value={fromPartial({ buildShlinkApiClient: vi.fn() })}>
|
||||
<MainHeader />
|
||||
</ContainerProvider>
|
||||
</Router>,
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user