canonical / canonical/react-components

Suggest using userEvent library instead of fireEvent for simulating user interaction

Open
#778 1 comment 0 reactions 0 assignees View on GitHub
Maintenance 🔨 P3 Triaged Priority: Low Triaged: new architecture
Dominant language
TypeScript
Stars
151
Forks
74
Avg merge
1d 2h
Merged PRs (30d)
11

Description

`userEvent` adds related event calls from browsers to make tests more realistic than its counterpart `fireEvent`, which is a low-level api.

This makes for a more user-centric, and closer-to-truth testing of user interactions.

- [ ] add eslint rule https://github.com/testing-library/eslint-plugin-testing-library/blob/main/docs/rules/prefer-user-event.md

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.