mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-05-04 04:16:18 +00:00
Do not inject servers state or actions
This commit is contained in:
@@ -2,18 +2,17 @@ import { screen } from '@testing-library/react';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { MemoryRouter } from 'react-router';
|
||||
import type { NonReachableServer, NotFoundServer, SelectedServer } from '../../../src/servers/data';
|
||||
import { ServerErrorFactory } from '../../../src/servers/helpers/ServerError';
|
||||
import { ServerError } from '../../../src/servers/helpers/ServerError';
|
||||
import { checkAccessibility } from '../../__helpers__/accessibility';
|
||||
import { renderWithStore } from '../../__helpers__/setUpTest';
|
||||
|
||||
describe('<ServerError />', () => {
|
||||
const ServerError = ServerErrorFactory(fromPartial({ DeleteServerButton: () => null }));
|
||||
const setUp = (selectedServer: SelectedServer) => renderWithStore(
|
||||
<MemoryRouter>
|
||||
<ServerError servers={{}} />
|
||||
<ServerError />
|
||||
</MemoryRouter>,
|
||||
{
|
||||
initialState: { selectedServer },
|
||||
initialState: { selectedServer, servers: {} },
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user