How to write tests in the AI era: 6 rules to stop mock-riddled brittle tests
dotey · x · 2026-09-15
In the vibe coding era, unguided AI writes brittle, mock-heavy tests that verify implementation rather than behavior. The author's thesis: quality is designed in, not tested in. His six rules: test behavior not implementation, use BDD with Given/When/Then, ban mocks (use real services or contract-checked fakes and fake timers), prefer E2E with tiered runs, treat coverage as a follow-up question (target 90% and interrogate uncovered failure paths), and encode rules as lints.
More from coding & agent
- Open-source tool adds SDLC workflow config and tracking on top of Orca multi-agent orchestration — Long_Philosopher3520 · 2026-09-15
- How to detect MCP capability drift when servers update tools: snapshot, diff and gate risky changes — daani_maas · 2026-09-15
- Brex CEO: Stop Building AI Agents, Build AI Employees and Sell the Work Itself — petergyang · 2026-09-15
- Community Grok Build hits 130K installs; AFK Pilot drives Grok, Codex, Claude Code from any browser — PawelHuryn · 2026-09-15
- Developer builds own coding agent harness, fights short context limits of free LLM tiers — danja · 2026-09-15
- Blender kinetic typography restyled by MiniMax H3: full workflow with prompt — Hailuo_AI · 2026-09-15