Snapshot tests don't catch regressions
An AI agent added Jest snapshot tests across your React component library to 'lock in behavior fast' and boost coverage before a refactor. It generated ~40 expect(render(<X {...props} />)).toMatchSnapshot() tests, all passing, and committed the .snap files. Your lead is pleased with the coverage jump. What are the risks of relying on these AI-generated snapshot tests as your safety net, and how would you make the suite actually protective?
review_snapshot_diff(before: list[str], after: list[str]) → list[str][["class=btn primary","aria-disabled=false","text=Submit"],["class=primary btn","aria-disabled=false","text=Submit"]]out[][["aria-disabled=true","text=Save"],["text=Save"]]out["aria-disabled"][["role=button","text=Save"],["role=button","text=Saved"]]out["text"]Treat the AI’s output as a draft to verify, not an answer to trust. Name the specific flaw and the input that triggers it, say how you’d catch it (tests, edge cases, reading critically), and how you’d re-prompt or decompose to get it right.
Vibe & agentic: describe the solution in plain language (or narrate it) and the coach grades your approach.