mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-18 05:23:49 +00:00
Explicitly wrap in ContainerProvider when calling renderWithStore
This commit is contained in:
@@ -2,7 +2,6 @@ import { fireEvent, screen, waitFor } from '@testing-library/react';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { createMemoryHistory } from 'history';
|
||||
import { Router } from 'react-router';
|
||||
import { ContainerProvider } from '../../src/container/context';
|
||||
import { CreateServer } from '../../src/servers/CreateServer';
|
||||
import type { ServersMap } from '../../src/servers/data';
|
||||
import { checkAccessibility } from '../__helpers__/accessibility';
|
||||
@@ -31,13 +30,7 @@ describe('<CreateServer />', () => {
|
||||
history,
|
||||
...renderWithStore(
|
||||
<Router location={history.location} navigator={history}>
|
||||
<ContainerProvider value={fromPartial({
|
||||
ImportServersBtn: () => <>ImportServersBtn</>,
|
||||
useTimeoutToggle,
|
||||
buildShlinkApiClient: vi.fn(),
|
||||
})}>
|
||||
<CreateServer />
|
||||
</ContainerProvider>
|
||||
<CreateServer useTimeoutToggle={useTimeoutToggle} />
|
||||
</Router>,
|
||||
{
|
||||
initialState: { servers },
|
||||
|
||||
Reference in New Issue
Block a user