testing-library/user-event
🐕 Simulate user events observed · 2026-08-28
Health v2 · maintenance only
98/100
- Activity 98
- Release rhythm 98
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 5.5
- age_days: 2904
- days_rel: 12
- days_push: 12
- n_releases_24m: 7
Adoption not part of the score
2323 stars · 256 forks observed · 2026-08-28
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-08-28 · 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 | 98 |
For agents
markdown · JSON · MCP: product_card(name="testing-library/user-event")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem