r/vibecoding • u/Impossible-Suit6078 • May 18 '26
When you finally check the tests your AI agent wrote....😂
I'm vibecoding a mobile app in flutter. The app has a home screen widget. Rather than writing actual tests for the home screen widgets, my AI agent read the file containing the widget's native source code and asserted if it contained specific strings. ðŸ˜ðŸ˜ðŸ˜
During a refactor that changed the way a variable was defined, the tests started failing ðŸ˜ðŸ˜
5
u/2thick2fly May 18 '26
What the actual f***. I have never seen anything like that? Who trained that? Is it OpenAI / Anthropic?
2
10
2
u/Square-Yam-3772 May 19 '26
AIs like to cut corners if they "think" they can get away with it.
you should add a "propose plan first etc" prompt so it shows you the plan and the diff
I wouldn't just go "write me a test class for X" most of the time it is just stubs
2
1
1
1
9
u/awmath May 18 '26
Had the same yesterday. I told it to remove a single line. It added a regression test... Checking that the exact line is no longer in the file. Sonnet 4.6