Open danielmariz opened 2 years ago
Something else is going on. Connected logics can be tested easily. I don't see why this wouldn't work:
await expectLogic(authLogic, () => router.actions.push('/auth/callback'))
.toDispatchActions([
'requestUserData'
])
.toNotHaveDispatchedActions([
'authenticationFailed'
])
await expectLogic(router)
.toMatchValues({
location: partial({pathname: '/auth/callback'})
})
// continue checking the other logic
You can also always write expect(router.values.location.pathname).toEqual('/auth/callback')
as well, but know that kea test utils always match values right after an action, whereas router.values.location
will always give the last one.
I was expecting a way to match values from connected logic: My current case is using kea-router
Code:
Test case:
Error printed: