Hacker News new | past | comments | ask | show | jobs | submit login

When setting up unit tests traditionally took more time and LOC than the logic itself, LLMs are particularly useful.

1. Paste in my actual code.

2. Prompt: Write unit tests, test tables. Include scenarios: A, B, C, D, E. Include all other scenarios I left out, isolate suggestions for review.

I used to spend the majority of the coding time writing unit tests and mocking test data, now it's more like 10%.




> Paste in my actual code.

> Prompt: Write unit tests

TDD in shambles. What you'd like is:

> Give your specs to some AI

> Get a test suite generated with all edge cases accounted for

> Code


Matter of preference. I've found TDD to be inflexible for my working style. But your suggestion would indeed work for a staunch TDD practitioner.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: