vazco / uniforms

A React library for building forms from any schema.
https://uniforms.tools
MIT License
1.94k stars 239 forks source link

Migrated `BaseForm` tests to @testing-library/react #1303

Closed piotrpospiech closed 6 months ago

piotrpospiech commented 6 months ago

Is part of #1130

I cannot migrate most of BaseForm tests, because it was based on BaseForm context or state. RTL doesn't support testing these cases. I didn't find another aproach to test these cases.

Additional issue is with ignores synchronous errors test. Using RTL, error cannot be catched.

codecov[bot] commented 6 months ago

Codecov Report

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

Comparison is base (1a6ca83) 94.66% compared to head (2588b61) 94.60%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1303 +/- ## ========================================== - Coverage 94.66% 94.60% -0.06% ========================================== Files 231 231 Lines 3821 3821 Branches 1029 1029 ========================================== - Hits 3617 3615 -2 Misses 82 82 - Partials 122 124 +2 ```

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