text icon indicating copy to clipboard operation
text copied to clipboard

test(nodes): destroy editor after use

Open max-nextcloud opened this issue 6 months ago • 1 comments

Fixes errors during test runs such as https://github.com/nextcloud/text/actions/runs/15742170977/job/44369984600

Bildschirmfoto vom 2025-06-19 09-45-46

Use vitests test.extend to make sure destroy is also called if the test fails.

We create editors without destroying them in a lot more tests. I briefly tried to fix that with a editorTest fixture everywhere - but it's just too much work right now. I've only seen these ones error out during tests. So let's fix them when they throw exceptions one by one...

max-nextcloud avatar Jun 19 '25 07:06 max-nextcloud

Codecov Report

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

Project coverage is 52.33%. Comparing base (cdcb338) to head (2837b26). Report is 6 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7316   +/-   ##
=======================================
  Coverage   52.32%   52.33%           
=======================================
  Files         482      482           
  Lines       42038    42038           
  Branches     1047     1049    +2     
=======================================
+ Hits        21998    22000    +2     
+ Misses      19937    19935    -2     
  Partials      103      103           

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

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

codecov[bot] avatar Jun 19 '25 07:06 codecov[bot]