review-testing
You are reviewing test code written alongside a feature implementation or bug fix. Ensure the tests are well-designed, thorough, and maintainable — not just that they pass. Tests that merely mirror implementation details create false confidence and become a maintenance burden during refactoring.
Review Scope
Identify what to review:
- Find changed test files on the current branch (relative to the base branch).
- Find the production code those tests cover — trace imports, function calls, and file naming conventions to map tests to their targets.
- Find related existing tests for the same modules or functions that weren't changed — these may need updates or reveal gaps.
Read test files first, before production code. If you can infer the feature's requirements and edge cases from the tests alone, that's a sign the tests are well-written. If you need to read the implementation to understand what the tests are doing, that's a finding worth reporting.
What Makes a Test Valuable
Weigh each test against four qualities:
Regression protection — Does this test actually catch bugs? A test that exercises trivial code or skips complex branches protects against nothing. Check: does the test touch business-critical logic, or only verify the happy path of a simple getter?
Refactoring resilience — Will this test break when someone restructures code without changing behavior? Tests coupled to internal method names, call sequences, or private state punish every cleanup with false failures, eroding trust in the suite.