41.05
item · Working in the open / Open source
msw-lens
npm package
Two jobs. The first is a scenario switcher: pick an endpoint, pick a scenario, and the app updates through Vite’s hot reload, with no handler files edited.
The second job is the point. Every AI conversation starts cold, and you end up narrating your own app to it. msw-lens writes that narration down once, as committed files: what’s mocked, which scenario is active for each endpoint, what’s passing through to the real network, and where the source is. For a given component, it crawls the imports and writes a ready-to-paste prompt for suggesting scenarios worth testing.
Designed for AI legibility first. Human legibility comes almost for free.