re: It’s Okay to Test Private Methods VIEW POST

re: I see the issue a bit differently. If you have many private methods or private methods that are complex enough to warrant being tested, it's a sign...

Yeah, I saw this argument a lot when I was researching the topic for this piece. But ultimately, I couldn’t find any battle tested rules on the subject—it’s more of a feeling. In other words, when is a good time to create that new module/class?

Regardless, I’m on board. It’s hard to test a class that has too much functionality, and overly complex methods are usually a code smell. I think these types of problems have to be tackled before worrying about private method testing.

code of conduct - report abuse