Do not inject remoteServers state or actions

This commit is contained in:
Alejandro Celaya
2025-11-14 23:20:42 +01:00
parent a7f2d3224b
commit 9e8498b16a
6 changed files with 42 additions and 35 deletions

View File

@@ -79,9 +79,8 @@ describe('remoteServersReducer', () => {
},
])('tries to fetch servers from remote', async ({ serversArray, expectedNewServers }) => {
jsonRequest.mockResolvedValue(serversArray);
const doFetchServers = fetchServers(httpClient);
await doFetchServers()(dispatch, vi.fn(), {});
await fetchServers(httpClient)(dispatch, vi.fn(), {});
expect(dispatch).toHaveBeenCalledTimes(3);
expect(dispatch).toHaveBeenNthCalledWith(2, expect.objectContaining({ payload: expectedNewServers }));