skovhus / jest-codemods

Codemods for migrating to Jest https://github.com/facebook/jest 👾
MIT License
877 stars 81 forks source link

fix(`jest-globals-import`): fix false negative in used globals check #575

Closed puglyfe closed 3 months ago

puglyfe commented 3 months ago

Closes https://github.com/skovhus/jest-codemods/issues/574

This adds an extra check to ensure that any used jest globals don't already have a corresponding ImportSpecifier.

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 92.60%. Comparing base (a94e2b5) to head (654e875). Report is 48 commits behind head on main.

:exclamation: Current head 654e875 differs from pull request most recent head fb8ccef. Consider uploading reports for the commit fb8ccef to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #575 +/- ## ========================================== + Coverage 92.38% 92.60% +0.22% ========================================== Files 26 27 +1 Lines 1944 2002 +58 Branches 405 415 +10 ========================================== + Hits 1796 1854 +58 Misses 102 102 Partials 46 46 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.