mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-04-23 15:06:17 +00:00
Introduce shoehorn as a possible replacement for ts-mockery
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import { screen, waitFor } from '@testing-library/react';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import type { ServerWithId } from '../../src/servers/data';
|
||||
import { DeleteServerModal } from '../../src/servers/DeleteServerModal';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
import { TestModalWrapper } from '../__helpers__/TestModalWrapper';
|
||||
@@ -20,7 +19,7 @@ describe('<DeleteServerModal />', () => {
|
||||
renderModal={(args) => (
|
||||
<DeleteServerModal
|
||||
{...args}
|
||||
server={Mock.of<ServerWithId>({ name: serverName })}
|
||||
server={fromPartial({ name: serverName })}
|
||||
deleteServer={deleteServerMock}
|
||||
/>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user