CtrlK
BlogDocsLog inGet started
Tessl Logo

testland/msw-handlers

Authors Mock Service Worker (MSW) request handlers for both browser and Node.js test environments using the `http.get` / `http.post` / `HttpResponse.json` API, wires them via `setupWorker` (browser) or `setupServer` (Node), and manages the test lifecycle (`server.listen` / `resetHandlers` / `close`). Use when the project uses JavaScript / TypeScript and needs to mock fetch / XHR at the network layer for both Vitest / Jest unit tests and Cypress / Playwright integration tests.

92

Quality

92%

Does it follow best practices?

Impact

Average score across 10 eval scenarios

SecuritybySnyk

Passed

No findings from the security scan

Overview
Quality
Evals
Security
Files

Evaluation results

Failed

A new test at the bottom of the file fails for no reason

Failed

An API change means editing the same fake response in five files

Failed

CI is making real calls to our API, and one test is lying

Failed

Green tests, 401s in production

Failed

Order tests disappeared during the upgrade

Failed

Our mocks only work inside a browser

Failed

Real users are seeing "John Doe"

Failed

The failure branches of our quote client have never run

Failed

Unit tests were green while the page showed "Plan: undefined"

Failed

We cannot test the add-to-cart flow

Agent
Claude Code
Model
Claude Sonnet 4.6