Closed danielmariz closed 3 years ago
Oh I got it, we can't destructure the values the way I did.
I had to do this
test('isAuthenticating value should change based on actions calls', async () => {
authLogic.mount()
const {requestAuthentication} = authLogic.actions
expect(authLogic.values.isAuthenticating).toBe(false)
requestAuthentication({email: 'test@test.org', password: '123456'})
expect(authLogic.values.isAuthenticating).toBe(true)
})
I'm writing simple tests based on the examples from the documentation, I thought I was missing something from my logic import so I copied the example from the docs page which also does not pass. The actions calls just don't change any value of the reducer. Is it something on the latest version? Code example:
Test example:
and the error printed: