Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

example-intro page provides an example using old version of msw #1365

Open
skondrashov opened this issue Feb 8, 2024 · 2 comments
Open

example-intro page provides an example using old version of msw #1365

skondrashov opened this issue Feb 8, 2024 · 2 comments

Comments

@skondrashov
Copy link

skondrashov commented Feb 8, 2024

Describe the bug
The "full example" at https://testing-library.com/docs/react-testing-library/example-intro imports rest from msw, which is not exported by the latest version of msw (2.1.7).

To Reproduce

  1. Go to https://testing-library.com/docs/react-testing-library/example-intro
  2. Use the Full Example to set up a test in your own project
  3. Realize that you don't have msw installed
  4. npm i -D msw
  5. Get Module '"msw"' has no exported member 'rest'. error

Expected behavior
No errors on the import {rest} from msw line

Additional context
I'm guessing the documentation was written when rest was a thing, now http appears to have replaced it.

@timdeschryver
Copy link
Member

We're in the process of updating the example at #1327

@skondrashov
Copy link
Author

Wonderful! Looking forward to it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants