Course

Mocking WebSocket APIs with Mock Service Worker

Lessons
22

Lessons

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