Testing a React/Redux app can be a problem. Recently, with new tools being created every day, choosing the right tool has become harder than ever. In this article, I will show you how you can use Jest to get your tests done.
When trying to use fetch in React to GET, POST, etc. you can't use current_user in controller because you don't have Session object available. Session returns: #ActionDispatch::Request::Session:0x7ffc75e90a88 not yet loaded Solution You need to add credentials: 'include' to fetch params. Read the explainer here: https://github.com/github/fetch#sending-cookies