Testing
Unit tests, integration tests, and why tests are most useful when they're automated.
-
Why tests exist
Hand-checking your app is already testing. A test is that same check written down so a machine can repeat it forever, which is what makes code safe to change later.
read -
Choose unit and integration tests
What unit, integration, and end-to-end tests each cover, what each one costs, and how to split the work on your first real project.
read -
Write your first tests
Set up Vitest, write your first describe/it/expect tests, and aim them at the functions with real edge cases. Then break one on purpose, because a test you have never seen fail proves nothing.
read -
Run your tests in CI
Wire your test runner into GitHub Actions with one small workflow file, walk it line by line, and make the green check required so untested code can't reach main.
read