I am currently facing an issue while attempting to simulate an animationEvent
for a test within my Angular application. The error message I receive is:
ReferenceError: AnimationEvent is not defined.
Given that this feature is experimental, it seems like it may not be supported in jsdom with Jest. Is there a workaround available to mock this?
The specific piece of code causing the failure is shown below
dispatchEvent(new AnimationEvent("animationend", { animationName: "slide-down" }));
If anyone has insights on how to resolve this issue, please share your suggestions.
This event should trigger certain functionality within my component and emit an output event upon occurrence. My goal is to ensure this takes place only when the event type with the animationName
'slide-down' occurs.