-
-
Save SoyRol4ndo/39c4ad2089241eb9ef96055f4ce18376 to your computer and use it in GitHub Desktop.
Revisions
-
Klerith revised this gist
Jun 17, 2025 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -29,7 +29,7 @@ npm install --save-dev @testing-library/react @testing-library/dom vitest jsdom ``` 4. Configurar `vite.config.ts` ```ts import { defineConfig } from 'vitest/config'; import react from '@vitejs/plugin-react-swc'; -
Klerith revised this gist
Jun 17, 2025 . 1 changed file with 15 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -27,3 +27,18 @@ npm install --save-dev @testing-library/react @testing-library/dom vitest jsdom "coverage": "vitest run --coverage" } ``` 4. Configurar `vite.config.ts` ``` import { defineConfig } from 'vitest/config'; import react from '@vitejs/plugin-react-swc'; // https://vite.dev/config/ export default defineConfig({ plugins: [react()], test: { environment: 'jsdom', globals: true, }, }); ``` -
Klerith created this gist
Jun 17, 2025 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ # Instalar dependencias Testing 1. [Vitest](https://vitest.dev/guide/) ```bash npm install --save-dev vitest jsdom ``` 2. React [Testing Library](https://testing-library.com/docs/react-testing-library/intro) ```bash npm install --save-dev @testing-library/react @testing-library/dom ``` - Todo en un sólo comando ```bash npm install --save-dev @testing-library/react @testing-library/dom vitest jsdom ``` 3. Crear estos scripts en el `package.json` ```json "scripts": { "test": "vitest", "test:ui": "vitest --ui", "coverage": "vitest run --coverage" } ```