trigger reload manually instead of relying on effects

This commit is contained in:
Athou
2022-08-13 21:57:03 +02:00
parent 4e5fd18eea
commit e803ce13eb
4 changed files with 22 additions and 60 deletions

View File

@@ -32,14 +32,7 @@ describe("entries", () => {
} as AxiosResponse<Entries>)
const store = configureStore({ reducer: reducers })
const promise = store.dispatch(
loadEntries({
sourceType: "feed",
req: {
id: "feed-id",
},
})
)
const promise = store.dispatch(loadEntries({ type: "feed", id: "feed-id" }))
expect(store.getState().entries.source.type).toBe("feed")
expect(store.getState().entries.source.id).toBe("feed-id")