Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Even with typed driven development you still want unit tests in the form of property based tests. Also a nice way to resolve the 10-50 lines issue is to follow the Arrange, Act, Assert pattern where you could look at the second block to see the actions. Move as much of the Arrange section into a setup and it should be a bit clearer :)



I really like property based tests. They feel like they're everything that unit tests without them were supposed to be.

* More closely encodes the behavior you want the code to have

* More likely to find weird edge cases where some input does something unexpected

* Less work to get greater coverage




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: