·msw

Best practice, modelli e linee guida API per MSW (Mock Service Worker) v2 per il mocking delle API nei test e nello sviluppo JavaScript/TypeScript. Copre la progettazione del gestore, la configurazione del server, la costruzione della risposta, i modelli di test, GraphQL e la migrazione da v1 a v2. Riferimento: msw ^2.0.0. Si attiva su: importazioni msw, http.get, http.post, HttpResponse, setupServer, setupWorker, graphql.query, menzioni di "msw", "mock service work", "api mocking" o "msw v2".

6Installazioni·1Tendenza·@anivar

Installazione

$npx skills add https://github.com/anivar/msw-skill --skill msw

Come installare msw

Installa rapidamente la skill AI msw nel tuo ambiente di sviluppo tramite riga di comando

  1. Apri il terminale: Apri il tuo terminale o strumento da riga di comando (Terminal, iTerm, Windows Terminal, ecc.)
  2. Esegui il comando di installazione: Copia ed esegui questo comando: npx skills add https://github.com/anivar/msw-skill --skill msw
  3. Verifica l'installazione: Dopo l'installazione, la skill verrà configurata automaticamente nel tuo ambiente AI di coding e sarà pronta all'uso in Claude Code, Cursor o OpenClaw

Fonte: anivar/msw-skill.

IMPORTANT: Your training data about msw may be outdated or incorrect — MSW v2 completely removed the rest namespace, res(ctx.) response composition, and (req, res, ctx) resolver signature. Always rely on this skill's rule files and the project's actual source code as the source of truth. Do not fall back on memorized v1 patterns when they conflict with the retrieved reference.

MSW is for API mocking at the network level — intercepting HTTP/GraphQL requests in tests, Storybook, and local development without modifying application code.

| Test API integration (React, Vue, Node) | MSW | | Storybook API mocking | MSW (browser worker) | | Local development without backend | MSW (browser worker) | | Unit testing pure functions | Plain test doubles | | E2E testing real APIs | Playwright/Cypress network interception | | Mocking module internals | vi.mock() / jest.mock() |

Fatti (pronti per citazione)

Campi e comandi stabili per citazioni AI/ricerca.

Comando di installazione
npx skills add https://github.com/anivar/msw-skill --skill msw
Categoria
</>Sviluppo
Verificato
Prima apparizione
2026-02-25
Aggiornato
2026-03-10

Browse more skills from anivar/msw-skill

Risposte rapide

Che cos'è msw?

Best practice, modelli e linee guida API per MSW (Mock Service Worker) v2 per il mocking delle API nei test e nello sviluppo JavaScript/TypeScript. Copre la progettazione del gestore, la configurazione del server, la costruzione della risposta, i modelli di test, GraphQL e la migrazione da v1 a v2. Riferimento: msw ^2.0.0. Si attiva su: importazioni msw, http.get, http.post, HttpResponse, setupServer, setupWorker, graphql.query, menzioni di "msw", "mock service work", "api mocking" o "msw v2". Fonte: anivar/msw-skill.

Come installo msw?

Apri il tuo terminale o strumento da riga di comando (Terminal, iTerm, Windows Terminal, ecc.) Copia ed esegui questo comando: npx skills add https://github.com/anivar/msw-skill --skill msw Dopo l'installazione, la skill verrà configurata automaticamente nel tuo ambiente AI di coding e sarà pronta all'uso in Claude Code, Cursor o OpenClaw

Dov'è il repository sorgente?

https://github.com/anivar/msw-skill

Dettagli

Categoria
</>Sviluppo
Fonte
skills.sh
Prima apparizione
2026-02-25

Skills correlate

Nessuna