Unit testing verifica unidades individuales de código (funciones, métodos, clases) en aislamiento — comprobando que cada pequeña pieza funciona correctamente por sí sola. Las pruebas unitarias son rápidas, enfocadas y forman la base de una buena estrategia de testing.
Por qué es importante
A UNIT test verifies the smallest testable piece (a function/method) in ISOLATION:
→ test ONE thing; give inputs, check the output/behavior
→ ISOLATED from dependencies (database, network, other units) — mock/stub those
→ FAST (no real I/O), focused, deterministic
