Module 09 Summary
What this module established
TestClient runs the full request path in-process - routing, validation, dependencies, response models and error handling - with no server and no network. That covers most of what actually breaks.
Carry forward
- Reset shared state in fixtures. Tests depending on each other's leftovers fail in ways that point at the wrong test.
- Override the expensive dependency and clear it afterwards. Overrides are global to the app object.
- Assert allowed values, ranges, required fields and the absence of extras - the last one catches an internal field leaking.
Before moving on
Move on when your offline suite covers every declared error status and runs in seconds with no key.
