Skip to content

Conversation

@gipcompany
Copy link

@gipcompany gipcompany commented Dec 10, 2025

Checks

Changes

  • Add prefer-user-event-setup rule to encourage using userEvent.setup() pattern over direct method calls
  • Add comprehensive test coverage with 44 test cases covering various usage scenarios
  • Add documentation explaining the rule benefits and correct usage patterns
  • Update README.md with new rule entry in supported rules table

Context

Closes #646

Enforces using userEvent.setup() pattern instead of direct method calls
as recommended in the official user-event documentation.
@gipcompany gipcompany force-pushed the pr/prefer-user-event-setup-rule branch from 3626415 to f89ad18 Compare December 10, 2025 00:45
@gipcompany gipcompany marked this pull request as ready for review December 10, 2025 00:58
@Belco90 Belco90 requested review from Belco90 and Copilot and removed request for Copilot December 10, 2025 06:30
@Belco90 Belco90 added the enhancement New feature or request label Dec 10, 2025
@codecov
Copy link

codecov bot commented Dec 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.62%. Comparing base (c945daf) to head (1f873f1).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1125      +/-   ##
==========================================
+ Coverage   96.51%   96.62%   +0.10%     
==========================================
  Files          51       52       +1     
  Lines        2872     2963      +91     
  Branches     1176     1226      +50     
==========================================
+ Hits         2772     2863      +91     
  Misses        100      100              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Recommend using the methods on the instances returned by userEvent.setup() from userEvent

2 participants