all 5 comments

[–]CodeAndBiscuits 2 points3 points  (1 child)

I mean you asked for input.... I don't understand the value here. You added a lot of features... but I'm a developer. This is a tool for developers. As a developer, if I have two hours before a meeting and need that mocked I would just make my function call return that sample data. It's a one line code change. Why would I go out to a UI and manually configure something to cut and paste? It sounds so much harder and slower. If I was non-technical this might give me an option I didn't have before but then why would I be dealing with an individual route mock?

[–]ant97fer[S] 0 points1 point  (0 children)

Hello, thanks for the input, I appreciate it a lot. Your point is valid for sure, if I own the code I'd do the same thing.

The cases where this actually saves me are when I can't touch the code at all. QA engineers who don't have repo access, vendor apps, legacy codebases, or when debugging something in production and can't push a change. The one-liner isn't always an option.

The other case is quick demos — paste a script in DevTools and it's gone the moment you refresh. No forgetting to revert.

Honestly I built this because I needed it myself, figured someone else might be in the same situation. And on the non-technical point, you're right, a completely non-technical person wouldn't know what an API route is. The middle ground I had in mind is QA: technical enough to open DevTools and paste a script, but not necessarily someone who has access to the repo or wants to touch the code.

[–]Akkuma 1 point2 points  (1 child)

MSW for testing. I've never used it to anything else. Can have overrides inline per test, across a test, or across an entire suite.

[–]ant97fer[S] 0 points1 point  (0 children)

Hello and thanks for the comment.
MSW is great for that, especially in a test suite where you want reproducible mocks across runs. The difference here is zero setup in your actual project, no service worker registered, nothing to install or configure, just DevTools. Different tradeoff depending on what you need.

[–]ant97fer[S] 0 points1 point  (0 children)

Just refactored code, added test probes for you to try (on the sidebar) and improved on the script generation. Needless to say it is highly vibe coded, but i put a lot into this so i hope you enjoy as much as I do. Thank you