Course
Mocking WebSocket APIs with Mock Service Worker
- Lessons
- 22
Lessons
- 01Introduction to Mocking WebSocket APIs with Mock Service Worker
- 02Install Mock Service Worker (MSW)
- 03Set Up Mock Service Worker in the Browser
- 04Intercept a WebSocket connection with Mock Service Worker
- 05Intercept WebSocket Client Events with Mock Service Worker
- 06Broadcast a Mocked Message to All WebSocket Clients
- 07Modify WebSocket Client Events with Mock Service Worker
- 08Replay a WebSocket Chat Conversation with Mock Service Worker
- 09Make a Type-safe and Runtime-safe WebSocket Communication with Zod
- 10Close a WebSocket Client Connection with Mock Service Worker
- 11Use a Custom Close Code to Close a WebSocket Connection with MSW
- 12Close Multiple WebSocket Clients with MSW
- 13Establish Actual WebSocket Server Connection with MSW
- 14Intercept WebSocket Server Events with MSW
- 15Prevent Server-to-client Message Forwarding in MSW
- 16Send Mocked WebSocket Client Messages to the Original Server with MSW
- 17Prevent WebSocket Server Close Event with MSW
- 18Prevent WebSocket Event Propagation Between Listeners with MSW
- 19Understand WebSocket Logs in MSW
- 20Test WebSockets in Vitest with MSW
- 21Test WebSockets in Playwright with MSW
- 22Override WebSocket Event Handling in Tests with MSW