cloudfour / pleasantest

⛵ Write real-browser tests with Testing Library in Jest
https://pleasantest.dev
MIT License
172 stars 2 forks source link

Make MSW work well (Network stubbing/interception) #31

Open calebeby opened 3 years ago

calebeby commented 3 years ago

MSW is a library for request interception. https://mswjs.io/

Here is a Kent article that explains why it is good.

Puppeteer has a built-in way to do request interception. But MSW's API is nicer and more intuitive.

We should look into either:

calebeby commented 3 years ago

Also worth looking into Cypress's API's for route interception and see if they have any good ideas that we can learn from, for example https://docs.cypress.io/api/commands/intercept.html looks pretty nice