3 ms·
> Then you need to make those functions public, […] That depends on the language, but often there will be a way to expose them to unit tests while keeping them
by Freak_NL 2y ago
> Then you need to make those functions public, […]
That depends on the language, but often there will be a way to expose them to unit tests while keeping them limited in exposure. Java has package private for this, with Rust the unit test sits in the same file and can access private function just fine. Other languages have comparable idioms.
- oxidant 2y agoJavascript doesn't, AFAIK. I work in Elixir, which doesn't. I'm for it if it's possible but it can still make it harder to follow.