I have created a function and I want to write a test case for that function. I am returning HTML content in that function.
my function code is -
export function executeScenario(handleExecuteScenarioClick: ((event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void) | undefined, classes: any , buttonTitle:string) {
return <Button id="executescenario" variant="contained" onClick={handleExecuteScenarioClick} type="button" className={classes.button} color="primary">
{buttonTitle}
</Button>;
}
I am using enzyme and jest and I wanna test this function and return a button to be true. How can I write test case for this function ?