Answer
A unit test verifies that a single, isolated piece of code (usually a function) behaves correctly for given inputs. A good unit test is fast, deterministic, tests one behavior at a time, and doesn't depend on external systems like a real database or network.
test('add() sums two numbers', () => {
expect(add(2, 3)).toBe(5);
});Real-world example Testing a formatCurrency() utility function in isolation before it's used across the app.