Lesson

Replay a WebSocket Chat Conversation with Mock Service Worker

Reproduce different WebSocket clients communicating using Mock Service Worker.

Access
Included
Transcript
Needs source

One of the reasons to mock any API is to get control over it. In this one, we will replay a chat conversation between two non-existing users by empoying everything we've learned so far. To replay that conversation for a particular WebSocket client, we will use the client.send() API.

Resources