Skip to content

Instantly share code, notes, and snippets.

View elIgnorante's full-sized avatar
📖
Learning

Álvaro Zermeño elIgnorante

📖
Learning
  • HydroTechNova
  • Aguascalientes, Aguascalientes México
View GitHub Profile
@Klerith
Klerith / vite-testing-config.md
Last active October 1, 2024 22:04
Vite + Jest + React Testing Library - Configuraciones a seguir

Instalación y configuracion de Jest + React Testing Library

En proyectos de React + Vite

  1. Instalaciones:
yarn add --dev jest babel-jest @babel/preset-env @babel/preset-react 
yarn add --dev @testing-library/react @types/jest jest-environment-jsdom
  1. Opcional: Si usamos Fetch API en el proyecto:

Tarea

  1. Crear un nuevo componente dentro de la carpeta SRC llamado CounterApp

  2. El CounterApp debe de ser un Functional Component

  3. El contenido del CounterApp debe de ser:

CounterApp