testing-library / testing-library/testing-library-docs
example-intro page provides an example using msw, which does not work with jest out of the box
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 479
- Forks
- 740
- PR merge metrics
- No merged PRs in 30d
Description
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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the example-intro page mentioned in the issue and review its MSW setup alongside the Jest and jsdom guidance. Verify whether the example works as documented and identify the required compatibility guidance or polyfills. Done means the docs clearly state the supported setup and any required configuration, or explain the recommended alternative.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation, testing-qa
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100