Skip to content

Comment on MSW 2.0 – Mock Service Workerparent

Comments

One of the biggest advantages of MSW, is that you can use the same mock server in your unit tests (jest) on Node.js environment and run the full frontend in the Browser for development and preview.

The best if you have totally the same mock data, so super easy to debug your tests.

Also, you can use this trick to have scenarios, so you can demo different behaviours just by passing a query param. QA loves it as well.

https://github.com/zoltan-nz/meetup-contacts-app-2021/blob/m...

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.