The Git tag for this section is websockets. It contains solutions to the exercises from the previous chapter, so if you haven't completed the Exercises section yourself, then you should move to this tag now so that you're up to date.
For more detailed instructions, see the To get the most out of this book section in the Preface.
For more detailed instructions, see the To get the most out of this book section in the Preface.
Let's start by filling out that first function, startSharing. This function will be called as a result of receiving the START_SHARING action, which is triggered when the user clicks the Start sharing button.
- In test/middleware/sharingSagas.test.js add the following imports at the top:
import { storeSpy, expectRedux } from 'expect-redux';
import { act } from 'react-dom/test-utils';
import { configureStore } from '../../src/store';
- At the bottom of the file, add a new describe...