1 min readAug 11, 2020
Testing private methods is not a good practice. While selecting between "private" and "public" access modifier, a thumbs up rule is to have methods exposed to HTML as public so that they are accessible.
You can indirectly test private methods by covering scenarios of public methods. Public methods will internally be using private methods. Hence, that should cover private methods.
But there are no strict rule on making component methods as private or public. Let me know if it helped.