userEvent
는 테스팅 라이브러리에서 브라우저에서 유저 인터렉션 관련 이벤트를 실행을 시뮬레이션 시키는 함수이다. testing-library에서 빌트인으로 되어있는 fireEvent
보다 더욱 많은 시뮬레이션을 제공한다.
최근 docs에서 user event 14버전으로 업데이트하여 사용하는 것을 권장한다. 13.5 버전에서 발생한 대부분의 버그들이 픽스되었다.
userEvent
was going to deliver on the promises that it madeAnother thing is we recommend using userEvent
rather than fireEvent most of the time.
I do introduce you to userEvent, but I used fireEvent in the videos, because I wasn't totally solid on whether userEvent was going to deliver on the promises that it made. It totally has. It's a really awesome package. I've updated everything in this repo to use userEvent rather than fireEvent.