mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-11 01:53:51 +00:00
Introduce shoehorn as a possible replacement for ts-mockery
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { Home } from '../../src/common/Home';
|
||||
import type { ServersMap, ServerWithId } from '../../src/servers/data';
|
||||
|
||||
@@ -19,9 +19,9 @@ describe('<Home />', () => {
|
||||
it.each([
|
||||
[
|
||||
{
|
||||
'1a': Mock.of<ServerWithId>({ name: 'foo', id: '1' }),
|
||||
'2b': Mock.of<ServerWithId>({ name: 'bar', id: '2' }),
|
||||
'3c': Mock.of<ServerWithId>({ name: 'baz', id: '3' }),
|
||||
'1a': fromPartial<ServerWithId>({ name: 'foo', id: '1' }),
|
||||
'2b': fromPartial<ServerWithId>({ name: 'bar', id: '2' }),
|
||||
'3c': fromPartial<ServerWithId>({ name: 'baz', id: '3' }),
|
||||
},
|
||||
3,
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user