npm install --save-dev vitest jsdom
- React Testing Library
npm install --save-dev @testing-library/react @testing-library/dom
- Todo en un sólo comando
npm install --save-dev @testing-library/react @testing-library/dom vitest jsdom
- Crear estos scripts en el
package.json
"scripts": {
"test": "vitest",
"test:ui": "vitest --ui",
"coverage": "vitest run --coverage"
}
- 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,
},
});
source & further reading
gist.github.com — original article
Create a side-by-side HTML word diff between two Git revisions (generated with gpt-6-luna)
Find .gov domain strings in bundled Claude Code binaries on macOS. Requires Python 3.
Zero After Withdrawal — the AxonOS Reference BCI