Coachmark Component: How to test "onAnimationOpenEnd" prop ? #31178
Unanswered
rockcs1992
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I'm implementing a very simple Coachmark component and writing unit tests for it to meet our test coverage threshold. Currently I have a hard time figuring out how to test "onAnimationOpenEnd" prop.
My test component:
And jest test file:
Icov report shows that the callback I provided to onAnimationOpenEnd prop is not called and not covered, but I cannot figure out how to trigger that in my jest test. From the generated screenshot I saw the following snippet:
And I think that opacity 0 may be the reason why the coachmark never gets expanded, and I'm not sure how to adjust it as well.
Any ideas would be appreciated!
Beta Was this translation helpful? Give feedback.
All reactions