score:0

Also, shouldn't chai.user() be chai.use() in your code example?

score:7

This error means that store can't get the state correctly. I would recommend mocking the store using redux-mock-store and import configureStore

import configureStore from 'redux-mock-store';

then mock the state by doing this

    const initialState = { id: 1 };
    const mockStore = configureStore();

and you can continue by wrapping your component with provider

import { Provider } from 'react-redux'; // add this to the top of your file

const wrapper = mount(
  <Provider store={mockStore(initialState)}>
    <MyComponent />
  </Provider>,
);

Related Query

More Query from same tag