epicweb-dev/react-component-testing-with-vitest
Über uns
Test your React components in the actual browser with Vitest Browser Mode.
Web- und App-EntwicklungGemessener Sternzuwachs
- in 24h
- Verlauf wird gesammelt
- in 7 days
- Verlauf wird gesammelt
- in 15 days
- Verlauf wird gesammelt
- in 1 month
- Verlauf wird gesammelt
Nettoänderungen in überlappenden Zeiträumen, keine Tagessummen. Fehlende Messwerte bleiben leer. Sterne zeigen Interesse, nicht Qualität.
README.md
OriginalReact Component Testing with Vitest
Learn how to test React components in the actual browser with Vitest.Prerequisites
You don't have to have any prior experience with Vitest or Vitest Browser Mode to complete this workshop.
- A basic experience with TypeScript is required.
- A basic experience with component-level testing is beneficial. This workshop works best if you've written component tests in the past. But don't worry if you haven't, you will write a bunch of those during the workshop!
- Get familiar with React Testing Library, especially its Guiding Principles. You don't need to have any prior experience of using the library.
Pre-workshop Resources
Here are some resources you can read before taking the workshop to get you up to speed on some of the tools and concepts we'll be covering:
System Requirements
All of these must be available in your PATH. To verify things are set up
properly, you can run this:
git --version
node --version
npm --version
If you have trouble with any of these, learn more about the PATH environment variable and how to fix it here for windows or mac/linux.
Setup
Use the Epic Workshop CLI to get this setup:
npx --yes epicshop@latest add react-component-testing-with-vitest
If you experience errors here, please open an issue with as many details as you can offer.
The Workshop App
Learn all about the workshop app on the Epic Web Getting Started Guide.
Troubleshooting
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'epicshop'
Reason: You likely have ignore-scripts=true in your .npmrc, which skips
the postinstall script that installs the workshop app.
Solution: Remove ignore-scripts=true from your ~/.npmrc and run the
setup command again.
Could not locate workshop-app directory
Reason: You ran npx epicshop start, which uses the globally installed
epicshop CLI that cannot find the workshop app.
Solution: Either one of the following:
- Run
npm startin the workshop directory instead; - Install the workshop app globally with
npm install -g @epic-web/workshop-appand run theepicshop startcommand again.
Ähnliche Projekte entdecken
Wird geladen…
