Introduce shoehorn as a possible replacement for ts-mockery

This commit is contained in:
Alejandro Celaya
2023-04-13 21:48:29 +02:00
parent f6334c3618
commit 340f4b8fb5
65 changed files with 357 additions and 375 deletions

View File

@@ -1,4 +1,4 @@
import { Mock } from 'ts-mockery';
import { fromPartial } from '@total-typescript/shoehorn';
import type { HttpClient } from '../../../src/common/services/HttpClient';
import { fetchServers } from '../../../src/servers/reducers/remoteServers';
@@ -8,7 +8,7 @@ describe('remoteServersReducer', () => {
describe('fetchServers', () => {
const dispatch = jest.fn();
const fetchJson = jest.fn();
const httpClient = Mock.of<HttpClient>({ fetchJson });
const httpClient = fromPartial<HttpClient>({ fetchJson });
it.each([
[