Workflow Code Review

Review Test Quality

Review workflow for evaluating test effectiveness

reviewtestingquality
CLAUDE.md

When reviewing tests in a PR:

  1. Check that tests cover the actual behavior change, not just that code runs without errors.
  2. Check test names: do they describe the expected behavior? Would a failing test name tell you what broke?
  3. Check for missing edge cases: empty inputs, nulls, boundary values, error paths.
  4. Check test independence: does each test set up its own state? Would tests pass in random order?
  5. Check assertions: are they specific? “expect(result).toEqual({…})” is better than “expect(result).toBeTruthy()”.
  6. Check for over-mocking: are internal modules mocked when they could be tested directly?
  7. Verify tests aren’t just snapshots of current behavior disguised as meaningful assertions.

Copy this workflow into your CLAUDE.md or agent config file so your agent follows this process automatically.

get crystl