Hacker News new | ask | show | jobs
by chamomeal 282 days ago
It’ll cheat a lot when writing unit tests. Particularly “agentic” tools like cursor. It’ll get a test to pass, even if it’s against a laughably incorrect implementation.

I’ve ended up with tests called stuff like “foobar successfully returns impossible value that suggests programmer error” lmao

2 comments

My favorite thing Claude code has been doing recently is adding second totally separate implementation of whatever I asked it to write tests for, and writing the tests against that.

Conveniently, when it then changes the original implementation, the tests don’t fail!

This is just about the only type of test i see it write lol
Yeah, or "bug was pre-existing and not my fault so shrug, here's a TODO and we'll just say it passed" (not those exact words, but close)
“70% of tests pass. This codebase is ready for production!”