Browse by type
Fire events the same way the user does
[![Build Status][build-badge]][build] [![Code Coverage][coverage-badge]][coverage] [![version][version-badge]][package] [![downloads][downloads-badge]][npmtrends] [![MIT License][license-badge]][license] ![All Contributors][all-contributors-badge] [![PRs Welcome][prs-badge]][prs] [![Code of Conduct][coc-badge]][coc] [![Discord][discord-badge]][discord]
[![Watch on GitHub][github-watch-badge]][github-watch] [![Star on GitHub][github-star-badge]][github-star] [![Tweet][twitter-badge]][twitter]
From testing-library/dom-testing-library#107:
[...] it is becoming apparent the need to express user actions on a web page using a higher-level abstraction than [
fireEvent][fire-event]
user-event tries to simulate the real events that would happen in the browser
as the user interacts with it. For example userEvent.click(checkbox) would
change the state of the checkbox.
[The more your tests resemble the way your software is used, the more confidence they can give you.][guiding-principle]
With NPM:
npm install --save-dev @testing-library/user-event @testing-library/dom
With Yarn:
yarn add --dev @testing-library/user-event @testing-library/dom
<input type="color" /> support.
#423Looking to contribute? Look for the [Good First Issue][good-first-issue] label.
Please file an issue for bugs, missing documentation, or unexpected behavior.
[See Bugs][bugs]
Please file an issue to suggest new features. Vote on feature requests by adding a 👍. This helps maintainers prioritize what to work on.
[See Feature Requests][requests]
For questions related to using the library, please visit a support community instead of filing an issue on GitHub.
Thanks goes to these people ([emoji key][emojis]):
browse all types & interfaces →
$ claude mcp add user-event \
-- python -m otcore.mcp_server <graph>