import { http, HttpResponse } from 'msw'import { setupWorker } from 'msw/browser' // Describe the network.const handlers = [ http.get('https://acme.com/product/:id', ({ params }) => { return HttpResponse.json({ id: params.id, title: 'Porcelain Mug', price: 9.99, }) }),] // Enable API mocking anywhere.const worker = setupWorker(...handlers)await worker.start() Omit implementation details Intercept
![Mock Service Worker](https://cdn-ak-scissors.b.st-hatena.com/image/square/eb2ffcb418a218f00d2f1f1032508bb1b5da6aa3/height=288;version=1;width=512/https%3A%2F%2Fmswjs.io%2Fog-image.jpg)