Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use mount/unmountAll from @hypothesis/frontend-testing #6693

Merged
merged 2 commits into from
Nov 26, 2024

Conversation

robertknight
Copy link
Member

@robertknight robertknight commented Nov 26, 2024

Change the client to use the new mount/unmountAll functions from @hypothesis/frontend-testing to simplify cleanup after tests run. This follows the same pattern as hypothesis/h#9125.

Use the `mount` utility from @hypothesis/frontend-testing for most tests instead
of `mount` from Enzyme. This simplifies test cleanup as the `unmountAll` call in
boostrap.js will unmount any UI components mounted via the function from
@hypothesis/frontend-testing.

There are a couple of exceptions for tests which need to modify or reuse the
container for other purposes. These still use Enzyme's `mount` API directly.
@robertknight robertknight marked this pull request as ready for review November 26, 2024 15:01
Copy link

codecov bot commented Nov 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.43%. Comparing base (c300a7a) to head (08cda4a).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6693   +/-   ##
=======================================
  Coverage   99.43%   99.43%           
=======================================
  Files         271      271           
  Lines       10214    10214           
  Branches     2433     2433           
=======================================
  Hits        10156    10156           
  Misses         58       58           

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

Copy link
Contributor

@acelaya acelaya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏🏼

@robertknight robertknight merged commit 88600ab into main Nov 26, 2024
4 checks passed
@robertknight robertknight deleted the use-mount-unmount-all branch November 26, 2024 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants