How HN: JediMock – Mock API responses in DevTools by wrapping fetch and XHR

machopicchu1 pts0 comments

JediMock — Mock APIs in DevTools. No install, no proxy, no cleanup.

For frontend devs and QA engineers who can't wait on the backend

Mock any API response.

Directly in DevTools._

The backend isn't returning what you need. You can't change it.<br>Configure the mock in JediMock, paste one script in the console.<br>The next request is intercepted — no service worker, no proxy, no certificate, no cleanup.<br>Zero footprint in your app. Zero trace when you're done.

Try it free — no account

View on GitHub

DevTools — Console

// paste the script. that's it.<br>⚡ JediMock active { url: '/api/users/*', mode: 'Merge' }<br>// your app makes requests as normal<br>⚡ JediMock intercepted { url: '/api/users/42', status: 200 }<br>// refresh the page — mock is gone, real API is back

When you need it

Test edge cases without backend help

Force a 401, an empty list, a timeout, or a specific error — without touching the server.

QA regression flows without a real environment

Run the same auth retry, error recovery, or empty-state scenario every time — deterministically.

Demo features before the API exists

Design reviews and stakeholder demos don't wait for backend sprints.

Reproduce a bug from production data

Paste the real response, edit the one field that triggers the bug, done.

Test async flows and polling

Async ID mode captures a dynamic ID from one request and injects it into the next — no callback server needed.

QA slow responses and timeouts

Add artificial delay, trigger fallback mode, or simulate a server that never responds — all without coordinating with anyone.

JediMock intercepts both fetch and XMLHttpRequest at the browser level —<br>no changes to your app, no service worker registered, no proxy process running.<br>Wildcards work: /api/users/* catches every user endpoint in one script.<br>Merge changes on top of the real response or replace it entirely.

Need more control? Response Rules let you return different data on specific call counts<br>— 401 on the first hit, 200 after, exactly like a real auth retry flow. Perfect for QA regression scripts<br>that need to reproduce the same sequence every time.<br>Fallback mode fires the mock automatically if the server doesn't respond within your timeout.<br>Async ID mode captures a job ID from a trigger request and replaces the placeholder in<br>your polling response — no real callback server needed.

Refresh the page and the mock is gone. The real API comes back. Nothing to undo.

vs. MSW, Mockoon, Charles, Proxyman — for devs and QA

Other tools

JediMock

Requires a service worker in your codebase

Zero footprint in your app

Proxy server or daemon running locally

Nothing running except your browser

HTTPS certificate to install and trust

Paste a script. Done.

Config files or a server process to maintain

Session persists in the browser, nothing to maintain

Intercept response OR request, not both

Intercept request + response in the same script

No fallback if the server is unreachable

Fallback mode fires the mock on timeout

QA needs a staging environment to test error flows

Reproduce any response, any error, any sequence — in any browser

Five tools, one file, no account. Mock generator with tree-based JSON editor,<br>bulk JSON editor with schema view and field history, validator with line-level error highlighting,<br>diff, and beautifier. Import and export configs. Share a full mock via URL.<br>Works in Chrome, Edge, and any Chromium-based browser — for frontend devs and QA engineers alike.

Open JediMock in your browser

Free. No install. No account. For frontend devs and QA engineers.

Open app →

⭐ Star on GitHub

mock jedimock response server real mode

Related Articles