User Event
@testing-library/user-event
Fire events the same way the user does
Testing
react-testing-library
dom-testing-library
react
testing
@testing-library/user-event
javascript
npm
frontend
open source
ui
Stars
2.3k
Weekly
34M
Open issues
122
Bundle
~15 kB
Installation
npm install @testing-library/user-eventCode example
import { UserEvent } from "@testing-library/user-event";
export function Example() {
return (
<div>
<h2>User Event</h2>
<UserEvent />
</div>
);
}Pros & cons
Pros
- Actively maintained by Giorgio Polvara
- 34M weekly downloads. Battle tested
- First-class TypeScript definitions
- MIT licensed
Considerations
- Adds roughly ~15 kB to your bundle
- Needs client-only rendering in SSR frameworks
- Not supported in React Native
- 122 open issues on GitHub