What is Unit Test?
Test one function or module in isolation.
Automated tests that exercise a small piece of code with controlled inputs, independent of the network and database (those get mocked). Fast enough to run on every save, they catch regressions at the source — the base of the testing pyramid, with integration and E2E tests above it.