Extracted duplicated code on creating visits reducers to a common helper function

This commit is contained in:
Alejandro Celaya
2022-11-12 20:37:04 +01:00
parent dac69daf03
commit 4b2c3d2db7
12 changed files with 137 additions and 239 deletions

View File

@@ -21,7 +21,7 @@ describe('orphanVisitsReducer', () => {
const buildShlinkApiClientMock = () => Mock.of<ShlinkApiClient>({ getOrphanVisits: getOrphanVisitsCall });
const creator = getOrphanVisitsCreator(buildShlinkApiClientMock);
const { asyncThunk: getOrphanVisits, largeAction, progressChangedAction, fallbackToIntervalAction } = creator;
const { reducer, cancelGetOrphanVisits } = orphanVisitsReducerCreator(creator);
const { reducer, cancelGetVisits: cancelGetOrphanVisits } = orphanVisitsReducerCreator(creator);
beforeEach(jest.clearAllMocks);