Introducción al Testing en React con Jest y RTL
Aprende por qué testear importa, cómo configurar Jest y React Testing Library en Vite, y escribe tu primer test real.
Testing Básico: Tu Primer Test de ProductCard (Ejercicio)
Escribe tus primeros 3 tests para el componente ProductCard de Reto-Shop usando render, screen y matchers de RTL.
Tests de Integración, Interacciones y Mocking
Testea clics, estado y Context con fireEvent, userEvent y jest.fn(). Aprende a mockear dependencias para aislar comportamientos.
Testing Avanzado: Simulando el Carrito de Reto-Shop (Ejercicio)
Escribe tests de integración para el carrito: simula clics, mockea el Context y usa userEvent y waitFor.
Entregable — Sprint 11: Suite de tests para Reto-Shop
Escribe una suite completa de tests para ProductCard, el hook useCarrito y una interacción de usuario con React Testing Library.