prime-simplereport icon indicating copy to clipboard operation
prime-simplereport copied to clipboard

[SPIKE] - Investigate MSW implementation to more parts of the frontend testing setup

Open fzhao99 opened this issue 2 years ago • 1 comments

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

fzhao99 avatar Aug 22 '23 21:08 fzhao99

Updated to a new MSW version here

fzhao99 avatar May 20 '24 15:05 fzhao99