1. @testing-library/user-event
Fire events the same way the user does
@testing-library/user-event
Package: @testing-library/user-event
Created by: testing-library
Last modified: Fri, 29 Dec 2023 15:54:08 GMT
Version: 14.5.2
License: MIT
Downloads: 38,558,757
Repository: https://github.com/testing-library/user-event

Install

npm install @testing-library/user-event
yarn add @testing-library/user-event

user-event

dog

Fire events the same way the user does


Read The Docs



Build Status
Code Coverage
version
downloads
MIT License
All Contributors
PRs Welcome
Code of Conduct
Discord

Watch on GitHub
Star on GitHub
Tweet

The problem

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

The solution

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.

Issues

Looking to contribute? Look for the Good First Issue label.

🐛 Bugs

Please file an issue for bugs, missing documentation, or unexpected behavior.

See Bugs

💡 Feature Requests

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

❓ Questions

For questions related to using the library, please visit a support community
instead of filing an issue on GitHub.

Contributors

We most sincerely thank the people who make this project
possible
. Contributions of any kind are welcome! 💚

License

MIT

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code