Closed JoseLion closed 6 months ago
Attention: Patch coverage is 66.66667%
with 2 lines
in your changes are missing coverage. Please review.
Project coverage is 95.61%. Comparing base (
a282d1e
) to head (3df8445
). Report is 6 commits behind head on main.
Files | Patch % | Lines |
---|---|---|
src/user-event/utils/warn-about-real-timers.ts | 50.00% | 2 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@mdjastrzebski I think Codecov might be using a cached version of the coverage report or something like that. When I generate the report, I see that src/user-event/utils/warn-about-real-timers.ts
is now 100% covered, but Codecov shows 50%, wdyt? 🤔
This PR has been released in RNTL v12.4.4! 🎉
Summary
Solves #1568 by decoupling press events in
user-event
from Jest dependency. As mentioned in the issue, this is done by replacing instances ofjest.fn()
with a simplenoop()
function, which does not cause any breaking change.Additionally, it solves a small bug with
warnAboutRealTimersIfNeeded()
that caused the warning to be triggered even whenRNTL_SKIP_AUTO_DETECT_FAKE_TIMERS
is present.Test plan
This PR can be tested following the issue's Steps to Reproduce:
userEvent.press(..)
callTypeError: event.persist is not a function