Recently I had to convert a class component to use hooks and in the process I had to adjust the jest tests as well for the component. One of the tests was to open a modal by cli