You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In an onclick event the currentTarget value is being altered (removed). Reproduction in codesandbox below. Extracting the event from the mocked implementation of the function itself has a value for the currentTarget property. In the mock.calls or mock.lastCall property on the mock itself, however, the currentTarget value has been removed. It is being changed within the reference of the event itself somehow as can be seen by both the expect().isEqual and expect().toBe tests.
Hello @sterlingwalsh. Please provide a minimal reproduction using a GitHub repository or StackBlitz (you can also use examples). Issues marked with needs reproduction will be closed if they have no activity within 3 days.
Describe the bug
In an onclick event the currentTarget value is being altered (removed). Reproduction in codesandbox below. Extracting the event from the mocked implementation of the function itself has a value for the currentTarget property. In the mock.calls or mock.lastCall property on the mock itself, however, the currentTarget value has been removed. It is being changed within the reference of the event itself somehow as can be seen by both the expect().isEqual and expect().toBe tests.
Expected behavior: event remains consistent.
Reproduction
https://codesandbox.io/p/devbox/lingering-sunset-7m8gzm?file=%2Fsrc%2Fitem.test.tsx%3A26%2C44
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: