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

In my personal experience I’ve been more prone to expose test specific code in implementation than my teammates, but even so:

- it’s usually to export things which are project internal (and create references where they’re magic numbers etc otherwise) specifically to decouple tests

- otherwise it’s been basically some lighter weight version of the null wrapper

And no one has complained. Perhaps they should but I think it hasn’t been an issue because my devotion to automated testing has been more thorough and thoughtful than many of those who’d complain, and they’re happy to benefit from the safety that provides.

Honestly I think test and implementation code should be more tightly coupled not less. At least in terms of being able to reference things that are clearly project-/package-private. I know this would bother a lot of people depending on discipline, but it’s pretty much exactly what people do in many Rust projects and seems pretty successful.




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

Search: