@RayFernando1337: I find the latest models write a lot of unit tests. Most of them restate the code they were written after, so they alwa…

X AI KOLs Timeline News

Summary

A tweet criticizes AI models for writing ineffective unit tests and shares a prompt to enforce better testing practices, emphasizing E2E tests and avoiding unit tests written after code.

I find the latest models write a lot of unit tests. Most of them restate the code they were written after, so they always pass and catch almost nothing. They run fast, but they break on every refactor and the agent burns time fixing tests instead of the feature. The prompt I used to clean out mine, adopted from Ansh is: "This repo is full of low-signal unit tests. Delete every one that wouldn't catch a real bug our E2E tests miss. Fan the work out across parallel subagents. Then add these rules to AGENTS.md so future agents stop writing them. - Never write unit tests after you write code. - Highly prefer E2E tests as the sole testing mechanism. Use them to verify complex features work. At the end of E2E tests, produce a verifiable and repeatable artifact. - If you must test a system in isolation, first write down all the ways it could fail, then write the code."
Original Article
View Cached Full Text

Cached at: 09/24/26, 10:24 AM

I find the latest models write a lot of unit tests. Most of them restate the code they were written after, so they always pass and catch almost nothing. They run fast, but they break on every refactor and the agent burns time fixing tests instead of the feature.

The prompt I used to clean out mine, adopted from Ansh is:

“This repo is full of low-signal unit tests. Delete every one that wouldn’t catch a real bug our E2E tests miss. Fan the work out across parallel subagents.

Then add these rules to AGENTS.md so future agents stop writing them.

  • Never write unit tests after you write code.

  • Highly prefer E2E tests as the sole testing mechanism. Use them to verify complex features work. At the end of E2E tests, produce a verifiable and repeatable artifact.

  • If you must test a system in isolation, first write down all the ways it could fail, then write the code.“

Ansh Nanda (@anshnanda): At the top of my AGENTS.md:

  • NEVER write unit tests after you write code.
  • Highly prefer E2E tests as the sole testing mechanism. Use them to verify complex features work. At the end of E2E tests, produce a verifiable and repeatable artifact.
  • If you must test a system in

Similar Articles

@mattpocockuk: "No tautological tests"

X AI KOLs Timeline

A tweet criticizes the AI model Opus for adding excessive unit tests for simple constant strings, highlighting issues with tautological testing in AI-assisted development.

Nobody's Testing AI Coding Agents Enough

Reddit r/AI_Agents

This article discusses the insufficient testing of AI coding agents, highlighting a critical gap in ensuring their reliability and safety in software development.

@lidangzzz: I've said it many times over the years: to make an AI Agent write good code, all the secrets are in the textbooks from the 1990s: - Write tests diligently, write more tests, push test coverage as high as possible - Do CI/CD properly, avoid messing up at all costs - For a new proj…

X AI KOLs Timeline

The author emphasizes that the key to making AI agents write good code lies in following classic software engineering practices from 1990s textbooks: writing tests, doing CI/CD properly, top-down design, and modular decoupling.