I have componentDidMount
which have one const. I am trying to cover unit test case for const which have ternary operator. Can anyone please help me on this how to cover ternary operator condition.
componentDidMount() {
const learnerId = (this.props.routeParam) ?
this.props.routeParam.learnerId :
MaterialModuleList.getQueryString('learnerId');
}