I have a private function outside component. It sounds more convenient to do test for function alone better than test it inside MyComponent, but it's private not exported.
function func(){
return something;
}
export default class MyComponent extends Component {
render <SomeComponent someProp={func()} />
}
I use mocha
and enzyme
for test and I wonder if there is anyway to test private function rather than test it inside the component.