Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
feat:
userEvent.press
#1386feat:
userEvent.press
#1386Changes from all commits
b41568b
65ba7db
ef041a0
f011f7c
f8e4d3e
6e69ba5
8aaa686
5e506f3
28014d0
e17f2dd
8fe1fb3
f5bb7b6
b772e04
e3a5352
010656e
1785009
71cade3
ed3ece0
f6c52f0
8aa8bb1
1a1f4f3
cddd4f7
0a549dc
dc74522
4a5c183
e1b456d
233db48
3bba09a
c02d781
8801a56
b6b0d30
c131447
327f1f1
83989b1
e99bb8e
0eaa235
b78b0c3
ba7103f
a094ca1
c8ad5bf
9f6cb60
2ba1987
d1548c5
17a2a43
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
This file was deleted.
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.
[high] Pls add tests using
test-utils/events
so that we can verify the whole sequence of events, including their payloads. This could replace the existingjest.fn()
for both called/not called scenarios, as event name will either be present or absent in the events array.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.
I have added a test that also checks payload events with fake timers. Like I explained in #1386 (comment), I don't think it can be tested with real timers
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.
[nit] Let's add check for
mockWarnAboutRealTimers
in this test instead of having a separate one just for this warning.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.
I prefer having a separate test because the test name makes it very clear what we're testing. Also there is no connection between longPress being called and the warning being emitted so either could fail independently so I think they're better tested in isolation