mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-14 19:43:49 +00:00
Introduce shoehorn as a possible replacement for ts-mockery
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
import { screen } from '@testing-library/react';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { fromPartial } from '@total-typescript/shoehorn';
|
||||
import { RealTimeUpdatesSettings } from '../../src/settings/RealTimeUpdatesSettings';
|
||||
import type {
|
||||
RealTimeUpdatesSettings as RealTimeUpdatesSettingsOptions,
|
||||
Settings,
|
||||
} from '../../src/settings/reducers/settings';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
@@ -12,7 +11,7 @@ describe('<RealTimeUpdatesSettings />', () => {
|
||||
const setRealTimeUpdatesInterval = jest.fn();
|
||||
const setUp = (realTimeUpdates: Partial<RealTimeUpdatesSettingsOptions> = {}) => renderWithEvents(
|
||||
<RealTimeUpdatesSettings
|
||||
settings={Mock.of<Settings>({ realTimeUpdates })}
|
||||
settings={fromPartial({ realTimeUpdates })}
|
||||
toggleRealTimeUpdates={toggleRealTimeUpdates}
|
||||
setRealTimeUpdatesInterval={setRealTimeUpdatesInterval}
|
||||
/>,
|
||||
|
||||
Reference in New Issue
Block a user