user-event
user-event copied to clipboard
userEvent.click(elem) injects ["_constructor-name_"] into element object
Reproduction example
userEvent.click(inputElement)
Prerequisites
await userEvent.click(input);
Expected behavior
user event doesn't mutate/modify the element (and related properties/objects)
Actual behavior
element (and related objects) being injected with and _constructor-name_
property.
including parentElement and related objects
This breaks and messes our code that relies on certain properties and object structure (like NodeList). Is there any way to disable this type of injection?
User-event version
14.5.1
Environment
Testing Library framework:
JS framework:
Test environment:
DOM implementation:
Additional context
No response