Step 5 of 6
Testing: unit, integration, end-to-end
A unit test checks one function in isolation. An integration test checks pieces working together (your API plus the database). An end-to-end (E2E) test drives a real browser like a user. Mocks are stand-ins for slow or external things like payment APIs.
Why it matters when you build with AI: Tests are how you know the AI's 'fix' didn't break something else. Ask the AI to write the test first, read it, then let it write the code.
Quick check
A test that drives a real browser through sign-up is a…
E2E tests act like a user, in a real browser.