logoalt Hacker News

egonschieletoday at 3:19 PM2 repliesview on HN

In a similar vein, here's my favorite prompt: "Please review the tests you've written. Will the tests actually test what they're meant to? If the code breaks, will the test fail?" It's amazing how often LLMs will write tests that don't test anything.


Replies

dualvariabletoday at 3:54 PM

I've seen a lot of human-written tests that wind up testing the testing framework and not the actual code.

show 1 reply
cagztoday at 5:39 PM

My workflow is: - Write the test first, confirm it fails - Write the minimum code to make that test pass - Confirm it is green

show 1 reply