May 2019
Intermediate to advanced
496 pages
10h 38m
English
We've completed the work on building the sagas, but we have just a couple of adjustments to make in the rest of the app in order to integrate the new feature. First, our MenuButtons are functionally complete, but we need to update the tests to properly exercise the middleware, ensuring we stub out the web socket library. Second, we need to fire off a TRY_START_WATCHING action as soon as the app starts:
let socketSpyFactory;let socketSpy;beforeEach(() => { socketSpyFactory = jest.spyOn(window, 'WebSocket'); socketSpyFactory.mockImplementation(() => { socketSpy = { close: () => {}, send: () => {} }; return socketSpy; ...Read now
Unlock full access