JSPM

@testing-library/user-event

14.6.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 17379243
  • Score
    100M100P100Q229680F
  • License MIT

Fire events the same way the user does

Package Exports

  • @testing-library/user-event
  • @testing-library/user-event/dist/cjs/clipboard/copy.js
  • @testing-library/user-event/dist/cjs/clipboard/cut.js
  • @testing-library/user-event/dist/cjs/clipboard/index.js
  • @testing-library/user-event/dist/cjs/clipboard/paste.js
  • @testing-library/user-event/dist/cjs/convenience/click.js
  • @testing-library/user-event/dist/cjs/convenience/hover.js
  • @testing-library/user-event/dist/cjs/convenience/index.js
  • @testing-library/user-event/dist/cjs/convenience/tab.js
  • @testing-library/user-event/dist/cjs/document/UI.js
  • @testing-library/user-event/dist/cjs/document/copySelection.js
  • @testing-library/user-event/dist/cjs/document/getValueOrTextContent.js
  • @testing-library/user-event/dist/cjs/document/index.js
  • @testing-library/user-event/dist/cjs/document/interceptor.js
  • @testing-library/user-event/dist/cjs/document/patchFocus.js
  • @testing-library/user-event/dist/cjs/document/prepareDocument.js
  • @testing-library/user-event/dist/cjs/document/trackValue.js
  • @testing-library/user-event/dist/cjs/event/behavior/click.js
  • @testing-library/user-event/dist/cjs/event/behavior/cut.js
  • @testing-library/user-event/dist/cjs/event/behavior/index.js
  • @testing-library/user-event/dist/cjs/event/behavior/keydown.js
  • @testing-library/user-event/dist/cjs/event/behavior/keypress.js
  • @testing-library/user-event/dist/cjs/event/behavior/keyup.js
  • @testing-library/user-event/dist/cjs/event/behavior/paste.js
  • @testing-library/user-event/dist/cjs/event/behavior/registry.js
  • @testing-library/user-event/dist/cjs/event/createEvent.js
  • @testing-library/user-event/dist/cjs/event/dispatchEvent.js
  • @testing-library/user-event/dist/cjs/event/eventMap.js
  • @testing-library/user-event/dist/cjs/event/focus.js
  • @testing-library/user-event/dist/cjs/event/index.js
  • @testing-library/user-event/dist/cjs/event/input.js
  • @testing-library/user-event/dist/cjs/event/radio.js
  • @testing-library/user-event/dist/cjs/event/selection/getInputRange.js
  • @testing-library/user-event/dist/cjs/event/selection/getTargetTypeAndSelection.js
  • @testing-library/user-event/dist/cjs/event/selection/index.js
  • @testing-library/user-event/dist/cjs/event/selection/modifySelection.js
  • @testing-library/user-event/dist/cjs/event/selection/modifySelectionPerMouse.js
  • @testing-library/user-event/dist/cjs/event/selection/moveSelection.js
  • @testing-library/user-event/dist/cjs/event/selection/resolveCaretPosition.js
  • @testing-library/user-event/dist/cjs/event/selection/selectAll.js
  • @testing-library/user-event/dist/cjs/event/selection/setSelection.js
  • @testing-library/user-event/dist/cjs/event/selection/setSelectionPerMouse.js
  • @testing-library/user-event/dist/cjs/event/selection/setSelectionRange.js
  • @testing-library/user-event/dist/cjs/event/selection/updateSelectionOnFocus.js
  • @testing-library/user-event/dist/cjs/event/types.js
  • @testing-library/user-event/dist/cjs/event/wrapEvent.js
  • @testing-library/user-event/dist/cjs/index.js
  • @testing-library/user-event/dist/cjs/keyboard/index.js
  • @testing-library/user-event/dist/cjs/keyboard/keyMap.js
  • @testing-library/user-event/dist/cjs/keyboard/parseKeyDef.js
  • @testing-library/user-event/dist/cjs/options.js
  • @testing-library/user-event/dist/cjs/pointer/index.js
  • @testing-library/user-event/dist/cjs/pointer/keyMap.js
  • @testing-library/user-event/dist/cjs/pointer/parseKeyDef.js
  • @testing-library/user-event/dist/cjs/setup/api.js
  • @testing-library/user-event/dist/cjs/setup/directApi.js
  • @testing-library/user-event/dist/cjs/setup/index.js
  • @testing-library/user-event/dist/cjs/setup/setup.js
  • @testing-library/user-event/dist/cjs/setup/wrapAsync.js
  • @testing-library/user-event/dist/cjs/system/index.js
  • @testing-library/user-event/dist/cjs/system/keyboard.js
  • @testing-library/user-event/dist/cjs/system/pointer/buttons.js
  • @testing-library/user-event/dist/cjs/system/pointer/device.js
  • @testing-library/user-event/dist/cjs/system/pointer/index.js
  • @testing-library/user-event/dist/cjs/system/pointer/mouse.js
  • @testing-library/user-event/dist/cjs/system/pointer/pointer.js
  • @testing-library/user-event/dist/cjs/system/pointer/shared.js
  • @testing-library/user-event/dist/cjs/utility/clear.js
  • @testing-library/user-event/dist/cjs/utility/index.js
  • @testing-library/user-event/dist/cjs/utility/selectOptions.js
  • @testing-library/user-event/dist/cjs/utility/type.js
  • @testing-library/user-event/dist/cjs/utility/upload.js
  • @testing-library/user-event/dist/cjs/utils/click/isClickableInput.js
  • @testing-library/user-event/dist/cjs/utils/dataTransfer/Blob.js
  • @testing-library/user-event/dist/cjs/utils/dataTransfer/Clipboard.js
  • @testing-library/user-event/dist/cjs/utils/dataTransfer/DataTransfer.js
  • @testing-library/user-event/dist/cjs/utils/dataTransfer/FileList.js
  • @testing-library/user-event/dist/cjs/utils/edit/isContentEditable.js
  • @testing-library/user-event/dist/cjs/utils/edit/isEditable.js
  • @testing-library/user-event/dist/cjs/utils/edit/maxLength.js
  • @testing-library/user-event/dist/cjs/utils/edit/setFiles.js
  • @testing-library/user-event/dist/cjs/utils/edit/timeValue.js
  • @testing-library/user-event/dist/cjs/utils/focus/cursor.js
  • @testing-library/user-event/dist/cjs/utils/focus/getActiveElement.js
  • @testing-library/user-event/dist/cjs/utils/focus/getTabDestination.js
  • @testing-library/user-event/dist/cjs/utils/focus/isFocusable.js
  • @testing-library/user-event/dist/cjs/utils/focus/selection.js
  • @testing-library/user-event/dist/cjs/utils/focus/selector.js
  • @testing-library/user-event/dist/cjs/utils/index.js
  • @testing-library/user-event/dist/cjs/utils/keyDef/readNextDescriptor.js
  • @testing-library/user-event/dist/cjs/utils/misc/cloneEvent.js
  • @testing-library/user-event/dist/cjs/utils/misc/findClosest.js
  • @testing-library/user-event/dist/cjs/utils/misc/getDocumentFromNode.js
  • @testing-library/user-event/dist/cjs/utils/misc/getTreeDiff.js
  • @testing-library/user-event/dist/cjs/utils/misc/getWindow.js
  • @testing-library/user-event/dist/cjs/utils/misc/isDescendantOrSelf.js
  • @testing-library/user-event/dist/cjs/utils/misc/isDisabled.js
  • @testing-library/user-event/dist/cjs/utils/misc/isElementType.js
  • @testing-library/user-event/dist/cjs/utils/misc/isVisible.js
  • @testing-library/user-event/dist/cjs/utils/misc/level.js
  • @testing-library/user-event/dist/cjs/utils/misc/wait.js
  • @testing-library/user-event/dist/cjs/utils/pointer/cssPointerEvents.js
  • @testing-library/user-event/dist/esm/clipboard/copy.js
  • @testing-library/user-event/dist/esm/clipboard/cut.js
  • @testing-library/user-event/dist/esm/clipboard/index.js
  • @testing-library/user-event/dist/esm/clipboard/paste.js
  • @testing-library/user-event/dist/esm/convenience/click.js
  • @testing-library/user-event/dist/esm/convenience/hover.js
  • @testing-library/user-event/dist/esm/convenience/index.js
  • @testing-library/user-event/dist/esm/convenience/tab.js
  • @testing-library/user-event/dist/esm/document/UI.js
  • @testing-library/user-event/dist/esm/document/copySelection.js
  • @testing-library/user-event/dist/esm/document/getValueOrTextContent.js
  • @testing-library/user-event/dist/esm/document/index.js
  • @testing-library/user-event/dist/esm/document/interceptor.js
  • @testing-library/user-event/dist/esm/document/patchFocus.js
  • @testing-library/user-event/dist/esm/document/prepareDocument.js
  • @testing-library/user-event/dist/esm/document/trackValue.js
  • @testing-library/user-event/dist/esm/event/behavior/click.js
  • @testing-library/user-event/dist/esm/event/behavior/cut.js
  • @testing-library/user-event/dist/esm/event/behavior/index.js
  • @testing-library/user-event/dist/esm/event/behavior/keydown.js
  • @testing-library/user-event/dist/esm/event/behavior/keypress.js
  • @testing-library/user-event/dist/esm/event/behavior/keyup.js
  • @testing-library/user-event/dist/esm/event/behavior/paste.js
  • @testing-library/user-event/dist/esm/event/behavior/registry.js
  • @testing-library/user-event/dist/esm/event/createEvent.js
  • @testing-library/user-event/dist/esm/event/dispatchEvent.js
  • @testing-library/user-event/dist/esm/event/eventMap.js
  • @testing-library/user-event/dist/esm/event/focus.js
  • @testing-library/user-event/dist/esm/event/index.js
  • @testing-library/user-event/dist/esm/event/input.js
  • @testing-library/user-event/dist/esm/event/radio.js
  • @testing-library/user-event/dist/esm/event/selection/getInputRange.js
  • @testing-library/user-event/dist/esm/event/selection/getTargetTypeAndSelection.js
  • @testing-library/user-event/dist/esm/event/selection/index.js
  • @testing-library/user-event/dist/esm/event/selection/modifySelection.js
  • @testing-library/user-event/dist/esm/event/selection/modifySelectionPerMouse.js
  • @testing-library/user-event/dist/esm/event/selection/moveSelection.js
  • @testing-library/user-event/dist/esm/event/selection/resolveCaretPosition.js
  • @testing-library/user-event/dist/esm/event/selection/selectAll.js
  • @testing-library/user-event/dist/esm/event/selection/setSelection.js
  • @testing-library/user-event/dist/esm/event/selection/setSelectionPerMouse.js
  • @testing-library/user-event/dist/esm/event/selection/setSelectionRange.js
  • @testing-library/user-event/dist/esm/event/selection/updateSelectionOnFocus.js
  • @testing-library/user-event/dist/esm/event/types.js
  • @testing-library/user-event/dist/esm/event/wrapEvent.js
  • @testing-library/user-event/dist/esm/index.js
  • @testing-library/user-event/dist/esm/keyboard/index.js
  • @testing-library/user-event/dist/esm/keyboard/keyMap.js
  • @testing-library/user-event/dist/esm/keyboard/parseKeyDef.js
  • @testing-library/user-event/dist/esm/options.js
  • @testing-library/user-event/dist/esm/pointer/index.js
  • @testing-library/user-event/dist/esm/pointer/keyMap.js
  • @testing-library/user-event/dist/esm/pointer/parseKeyDef.js
  • @testing-library/user-event/dist/esm/setup/api.js
  • @testing-library/user-event/dist/esm/setup/directApi.js
  • @testing-library/user-event/dist/esm/setup/index.js
  • @testing-library/user-event/dist/esm/setup/setup.js
  • @testing-library/user-event/dist/esm/setup/wrapAsync.js
  • @testing-library/user-event/dist/esm/system/index.js
  • @testing-library/user-event/dist/esm/system/keyboard.js
  • @testing-library/user-event/dist/esm/system/pointer/buttons.js
  • @testing-library/user-event/dist/esm/system/pointer/device.js
  • @testing-library/user-event/dist/esm/system/pointer/index.js
  • @testing-library/user-event/dist/esm/system/pointer/mouse.js
  • @testing-library/user-event/dist/esm/system/pointer/pointer.js
  • @testing-library/user-event/dist/esm/system/pointer/shared.js
  • @testing-library/user-event/dist/esm/utility/clear.js
  • @testing-library/user-event/dist/esm/utility/index.js
  • @testing-library/user-event/dist/esm/utility/selectOptions.js
  • @testing-library/user-event/dist/esm/utility/type.js
  • @testing-library/user-event/dist/esm/utility/upload.js
  • @testing-library/user-event/dist/esm/utils/click/isClickableInput.js
  • @testing-library/user-event/dist/esm/utils/dataTransfer/Blob.js
  • @testing-library/user-event/dist/esm/utils/dataTransfer/Clipboard.js
  • @testing-library/user-event/dist/esm/utils/dataTransfer/DataTransfer.js
  • @testing-library/user-event/dist/esm/utils/dataTransfer/FileList.js
  • @testing-library/user-event/dist/esm/utils/edit/isContentEditable.js
  • @testing-library/user-event/dist/esm/utils/edit/isEditable.js
  • @testing-library/user-event/dist/esm/utils/edit/maxLength.js
  • @testing-library/user-event/dist/esm/utils/edit/setFiles.js
  • @testing-library/user-event/dist/esm/utils/edit/timeValue.js
  • @testing-library/user-event/dist/esm/utils/focus/cursor.js
  • @testing-library/user-event/dist/esm/utils/focus/getActiveElement.js
  • @testing-library/user-event/dist/esm/utils/focus/getTabDestination.js
  • @testing-library/user-event/dist/esm/utils/focus/isFocusable.js
  • @testing-library/user-event/dist/esm/utils/focus/selection.js
  • @testing-library/user-event/dist/esm/utils/focus/selector.js
  • @testing-library/user-event/dist/esm/utils/index.js
  • @testing-library/user-event/dist/esm/utils/keyDef/readNextDescriptor.js
  • @testing-library/user-event/dist/esm/utils/misc/cloneEvent.js
  • @testing-library/user-event/dist/esm/utils/misc/findClosest.js
  • @testing-library/user-event/dist/esm/utils/misc/getDocumentFromNode.js
  • @testing-library/user-event/dist/esm/utils/misc/getTreeDiff.js
  • @testing-library/user-event/dist/esm/utils/misc/getWindow.js
  • @testing-library/user-event/dist/esm/utils/misc/isDescendantOrSelf.js
  • @testing-library/user-event/dist/esm/utils/misc/isDisabled.js
  • @testing-library/user-event/dist/esm/utils/misc/isElementType.js
  • @testing-library/user-event/dist/esm/utils/misc/isVisible.js
  • @testing-library/user-event/dist/esm/utils/misc/level.js
  • @testing-library/user-event/dist/esm/utils/misc/wait.js
  • @testing-library/user-event/dist/esm/utils/pointer/cssPointerEvents.js

Readme

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