MSW is an API mocking library similar to Wiremock but for Javascript. We're using it in our Storybook setup and the team suspects there might be productivity improvements to spreading this more generally into our frontend testing setup. Understanding much of our frontend testing PR's contain setting up GraphQL mocks, there might be an opportunity to centralize / decouple the data mocking away from our functional UI code much like we have with Wiremock on the backend.
This spike captures the work necessary to research and put together a proof of concept for using MSW endpoints for our GraphQL mocking setup to determine if we should proceed with adopting MSW. Some adoption guidelines and larger considerations for future work are also appropriate.
MSW is an API mocking library similar to Wiremock but for Javascript. We're using it in our Storybook setup and the team suspects there might be productivity improvements to spreading this more generally into our frontend testing setup. Understanding much of our frontend testing PR's contain setting up GraphQL mocks, there might be an opportunity to centralize / decouple the data mocking away from our functional UI code much like we have with Wiremock on the backend.
This spike captures the work necessary to research and put together a proof of concept for using MSW endpoints for our GraphQL mocking setup to determine if we should proceed with adopting MSW. Some adoption guidelines and larger considerations for future work are also appropriate.
Useful links
Link to their example GQL setup in their docs
The Storybook addon that we're using in our frontend component setup