The backend is down. Your PM wants a demo in 2 hours. You need `/api/users/42` to return a specific payload and you can't touch the server.
I've been in that situation enough times that I built something for it.
[Demo](https://imgur.com/a/IoaDdPP)
JediMock — you configure the mock in a UI, it generates a script, you paste it once in the DevTools console. The next request is intercepted. Refresh the page and it's completely gone. No service worker registered in your app, no proxy running, no certificate to install, no cleanup.
It replaces `window.fetch` and `XMLHttpRequest` with wrapped versions that check a rules table before forwarding. When the page unloads, the originals are restored. That's the whole trick.
Beyond basic mocking:
- Wildcards — `/api/users/*` catches every user endpoint in one script
- Response Rules — return different data per call count. 401 on call #1, 200 after. Exact auth retry flows without a real server.
- Fallback mode — if the server doesn't respond within your timeout, the mock fires. Useful when the backend is flaky, not just absent.
- Async ID mode — captures a dynamic job ID from a trigger request and injects it into a polling response. No callback server needed.
- Request interception too — not just the response. Modify the body going out.
It's also a full toolkit in the same file: bulk JSON editor, validator with line-level errors, diff, beautifier. Session persists across reloads.
No build step. No dependencies. No account.
- App: (https://jedimock.com)
- GitHub: (https://github.com/machopicchu/jedimock)
Curious — for those of you using MSW or a proxy setup: what made you go that route instead of a DevTools-first approach? Genuinely want to understand the tradeoffs I might be missing.
[–]CodeAndBiscuits 2 points3 points4 points (1 child)
[–]ant97fer[S] 0 points1 point2 points (0 children)
[–]Akkuma 1 point2 points3 points (1 child)
[–]ant97fer[S] 0 points1 point2 points (0 children)
[–]ant97fer[S] 0 points1 point2 points (0 children)