Migrated create visit action to use payload

This commit is contained in:
Alejandro Celaya
2022-11-05 13:01:00 +01:00
parent cd90d3e581
commit d588d8d9ef
17 changed files with 54 additions and 51 deletions

View File

@@ -135,7 +135,7 @@ describe('domainVisitsReducer', () => {
const { visits } = reducer(prevState, {
type: CREATE_VISITS,
createdVisits: [{ shortUrl, visit: { date: formatIsoDate(now) ?? undefined } }],
payload: { createdVisits: [{ shortUrl, visit: { date: formatIsoDate(now) ?? undefined } }] },
} as any);
expect(visits).toHaveLength(expectedVisits);