How can I test the return value for this function ?
handleValidatePassword = (confirmPassword) => {
const { newPassword } = this.props;
if (newPassword !== confirmPassword) {
return <FormattedMessage id="some value" />;
}
}
I need to check if the returned value of this function is the expected one if condition is right:(FormattedMessage return span with value === id)
<span> some value </span>
i'm using shallow from enzyme for test