Unit testing verifies individual units of code (functions, methods, classes) in isolation — checking that each small piece works correctly on its own. Unit tests are fast, focused, and form the foundation of a good testing strategy.
What a unit test is
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
