- Instalaciones
yarn add -D vitest jsdom @vitest/ui @testing-library/react @vitest/coverage-c8
- Configuraciones
2.1 En vite.config.js, añadir lo siguiente al defineConfig:
test: { environment: 'jsdom', globals: true }
2.2 En package.json, añadir lo siguiente dentro de scripts:
"test": "vitest",
"test:ui": "vitest --ui",
"coverage": "vitest run --coverage"
Last active
November 28, 2022 15:41
-
-
Save CarmeloRicarte/bc810a623ae28275d858c73ac153a763 to your computer and use it in GitHub Desktop.
Vitest - Testing Library - React config for Javascript
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment