-
Notifications
You must be signed in to change notification settings - Fork 1
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
[Feature] Chip 컴포넌트 테스트 코드 작성 #90
Closed
Closed
Conversation
This file contains 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
🎉 변경 사항
🙏 여기는 꼭 봐주세요!
@ghdtjgus76
Switch 컴포넌트와 Chip 컴포넌트가 유사한게 굉장히 많아서 코드를 많이 참고했는데요,
확인해보니 testing library의 fireEvent에 대한 사용을 많이 하셨더라구요,
어떤 아티클을 읽어보니까 ,
fireEvent
에서userEvent
로 마이그레이션을 하시길래 그 이유를 찾아보았습니다.fireEvent.click
은 단순히 클릭 이벤트만 일으키지만,userEvent.click
은 어떤element
에서 발생한 이벤트인지 체크하여, 클릭이벤트가 호출될 때 브라우저에서 발생하는 모든 이벤트들을 함께 발생시켜준다.(DOM Event 형식으로 발생)