testing-library/user-event
Some data may be outdated โ see provenance labels.
๐ Simulate user events observed ยท 2026-09-30
Health v2 ยท maintenance only
94/100
- Activity 92
- Release rhythm 93
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) โ computed 2026-10-21. Adoption (stars, forks) is never an input.
- gap_med: 6
- age_days: 2952
- days_rel: 49
- days_push: 49
- n_releases_24m: 8
Adoption not part of the score
2331 stars ยท 258 forks observed ยท 2026-09-30
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
user-event is a companion library for Testing Library that simulates real user interactions with the DOM by dispatching the full sequence of events a browser would fire for actions like clicking, typing, and uploading files. It provides higher-level interaction APIs than raw fireEvent, including visibility and interactability checks, making component tests behave more like real user sessions in jsdom or happy-dom environments.
Use cases
- simulate user typing and clicking in jsdom tests
- test react components with realistic user interactions
- fire full browser event sequences instead of single dom events
- test keyboard input including modifier keys and key sequences
- simulate file uploads and clipboard interactions in tests
- write user-centric tests for frontend ui components
- test that hidden or disabled elements reject interactions like a real browser
When to choose
- you are writing Testing Library component tests that run in jsdom or happy-dom
- you need realistic multi-event interactions like focus-then-type instead of raw fireEvent calls
- you want built-in checks that prevent interacting with hidden or disabled elements
- you need to simulate keyboard, pointer, clipboard, and upload workflows in unit tests
When to avoid
- your tests can run in a real browser - prefer Vitest Browser Mode or Playwright instead
- you are writing end-to-end tests where Playwright's auto-waiting locator actions are a better fit
- you need to dispatch a single specific DOM event that user-event does not implement
- you need layout-aware pointer testing since jsdom has no layout and positions are not simulated
Facets
library ยท maturity active
testing e2e-testing mocking testing frontend web-development developer-tools browser cross-platform dom-testing user-interaction-simulation testing-library jsdom happy-dom jest vitest event-dispatching ui-testing component-testing nodejs
10 sources
- readme: https://github.com/testing-library/user-event ยท fetched 2026-09-30 ยท e7ca5a38c37a
- homepage: https://testing-library.com/user-event ยท fetched 2026-08-29 ยท 8e6b835ab312
- site_page: https://testing-library.com/docs ยท fetched 2026-08-29 ยท 294680c6ca00
- site_page: https://testing-library.com/docs/recipes ยท fetched 2026-08-29 ยท e707259ba080
- site_page: https://testing-library.com/docs/queries/about ยท fetched 2026-08-29 ยท 1bb7d31eef5f
- site_page: https://testing-library.com/docs/dom-testing-library/intro ยท fetched 2026-08-29 ยท 273a42fd0eae
- site_page: https://testing-library.com/docs/user-event/install ยท fetched 2026-08-29 ยท 6cc048b7b85c
- site_page: https://testing-library.com/docs/user-event/setup ยท fetched 2026-08-29 ยท f69153c6b2dd
- site_page: https://testing-library.com/docs/user-event/options ยท fetched 2026-08-29 ยท 20ec4228d2dc
- site_page: https://testing-library.com/docs/user-event/pointer ยท fetched 2026-08-29 ยท 467110a64cc6
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| testing-library/user-event | main | 94 |
For agents
markdown ยท JSON ยท MCP: product_card(name="testing-library/user-event")
Data as of 2026-10-19T08:05:51.212177+00:00 ยท Report a problem