-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(Canvas): in/out event names were swapped #9396
Conversation
1362374
to
9fce182
Compare
511c4c5
to
f0231ed
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed types and added tests
Why was the type fix reverted? If you use the optional operator, it won't complain if the |
const exit = new MouseEvent('mousemove', { clientX: 20, clientY: 20 }); | ||
canvas._onMouseMove(enter); | ||
canvas._onMouseMove(exit); | ||
expect(targetSpy.mock.calls).toMatchSnapshot(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ShaMan123 This could have been targetSpy.mock.calls.map(([event]) => event)
, then even use toMatchInlineSnapshot
for a much smaller and nicer snapshot, while being convenient.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes.
stop toMatchSnapthot
.
I didn't look into it but build was failing. |
@ShaMan123 @jiayihu you are welcome to merge laser focused fixes like this but:
We can simply say: |
Event names were swapped during the migration.
EDIT:
Link to the source of the bug:
b6f076c#diff-c24dadcf5292c5b8555816413000f03a691de5a3caf99544bd9d33eed564a30eR1320-R1345
compared to
b6f076c#diff-72332330d8e00b2fda6e57d000a93e4e8dd8a46fdc8bcbdb3320c23b1509f8b5L1199-L1228