mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2025-05-09 13:10:19 +03:00
Introduce shoehorn as a possible replacement for ts-mockery
This commit is contained in:
parent
f6334c3618
commit
340f4b8fb5
65 changed files with 357 additions and 375 deletions
test/servers/helpers
|
@ -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 type { NonReachableServer, NotFoundServer } from '../../../src/servers/data';
|
||||
import { ServerError as createServerError } from '../../../src/servers/helpers/ServerError';
|
||||
|
||||
|
@ -9,7 +9,7 @@ describe('<ServerError />', () => {
|
|||
|
||||
it.each([
|
||||
[
|
||||
Mock.all<NotFoundServer>(),
|
||||
fromPartial<NotFoundServer>({}),
|
||||
{
|
||||
found: ['Could not find this Shlink server.'],
|
||||
notFound: [
|
||||
|
@ -20,7 +20,7 @@ describe('<ServerError />', () => {
|
|||
},
|
||||
],
|
||||
[
|
||||
Mock.of<NonReachableServer>({ id: 'abc123' }),
|
||||
fromPartial<NonReachableServer>({ id: 'abc123' }),
|
||||
{
|
||||
found: [
|
||||
'Oops! Could not connect to this Shlink server.',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue