-
Notifications
You must be signed in to change notification settings - Fork 471
feat(userEvent): build-in @testing-library/user-event #616
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
Closed
Closed
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
ff8261c
feat(userEvent): build-in @testing-library/user-event
kentcdodds 37474a2
fix(userEvent): actually export userEvent
kentcdodds c61d22e
fix: make everything async
kentcdodds 277d0c8
test: add all event types as listeners
kentcdodds faaf8dc
feat(userEvent): add {del} and {selectall}
kentcdodds 78af873
fix(clear): make re-use type
kentcdodds 02c5018
chore: move things to individual files
kentcdodds 6956fa8
fix(hover): correctness audit on hover
kentcdodds 80872ea
fix(type): allow typing decimal numbers
kentcdodds 4a3381a
Update src/user-event/__tests__/tab.js
kentcdodds 2e253be
test: get coverage up
kentcdodds 1ef19ab
test: improve test title
kentcdodds 8b1482b
test: improve test title
kentcdodds d0ff606
test: rework snapshot tests
kentcdodds 0812854
tests: fix snapshot serializers stuff
kentcdodds 81ae650
refactor(type): move things out of type
kentcdodds 3cffc38
fix(type): do not select if not needed
kentcdodds d9dc068
test: pull userEvent from the public interface
kentcdodds 30398cc
fix(clear): correctness audit
kentcdodds a012090
fix(userEvent): correct events fired for several things
kentcdodds 5d1cc0a
userEvent(click): improve correctness for clicks
kentcdodds e14ae9b
fix(upload): improve correctness
kentcdodds b470cb4
fix(tab): make the events more correct
kentcdodds 0ebcba3
fix(type): improve accurracy, remove allAtOnce, and use click
kentcdodds 55964d7
fix(selectOptions): improve correctness
kentcdodds 9ae603f
fix(deselectOptions): remove toggle and use explicit select and deselect
kentcdodds 6dc8fd4
chore: fix comment
kentcdodds 6981612
fix(click): remove unused exports
kentcdodds 52efb3b
feat(type): automatically release modifiers
kentcdodds d46f52a
chore: fix comment correctness
kentcdodds 480fe24
fix(userEvent): don't select option if select is disabled (#641)
nickserv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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.
The rule seems fairly reasonable to me. Any reasons you can't use function expressions over function declarations?
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.
This rule bugs me a bit. I prefer this:
Over this:
Applies to all HOCs I use in React (like
React.memo
). In here we have thiswrapAsync
function which wraps all of our utilities in the config'sasyncWrapper
and I just like the way it looks better when we reassign the function.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.
Why do you prefer the first one? Because I definitely didn't know you can re-assign function declarations. I wouldn't think this is valid which is exactly the rationale of this rule. The second pattern looks fine to me.
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.
In any case: If you like it why not disable it in kcd-scripts and explain the rationale? If you only have a personal, stylistic preference I'd always favor the default ruleset which makes onboarding easier.
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've been meaning to disable it in eslint-config-kentcdodds for a while now 😅 Just haven't gotten around to it.
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 didn't know that was possible either