Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

example-intro page provides an example using msw, which does not work with jest out of the box

Aperta
#1,367 4 commenti 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 4 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Documentazione
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
javascript

Direzione di ricerca

Inizia dalla pagina example-intro menzionata nell’issue e rivedi la relativa configurazione di MSW insieme alle indicazioni su Jest e jsdom. Verifica se l’esempio funziona come documentato e individua le indicazioni di compatibilità o i polyfill necessari. Il lavoro è completato quando la documentazione indica chiaramente la configurazione supportata e qualsiasi configurazione necessaria, oppure spiega l’alternativa consigliata.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

I've been working on setting up tests in a project for a few days now, and I am genuinely confused how people have been setting up RTL using the docs for the last 3 or 4 years since msw replaced the mocking examples that were previously in the docs. The docs explicitly recommend jest, msw explicitly does not work with jsdom, which is required to run tests with jest. How have people been able to use the docs for the last several years? I feel like I'm missing something huge since I don't see a flood of other developers leaving similar issues and comments, but what is the recommended thing to do? Should I abandon jest like @kettanaito recommends, and can the docs reflect that if so? Can the docs include the required polyfills if everyone is just stackoverflowing their way through it like I've been trying to?

Lingua principale
JavaScript
Stelle
479
Fork
738
Merge medio
5g 1h
PR unite (30g)
2

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di testing-library/testing-library-docs

Tutte le issue di testing-library/testing-library-docs

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.