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
1.5k
Weekly
35M
Open issues
18
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
- 35M 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
- 18 open issues on GitHub