Skip to content

test(superdoc): tighten assertions + adjust codecov policy#2841

Merged
caio-pizzol merged 1 commit intomainfrom
caio/superdoc-coverage-cleanup
Apr 16, 2026
Merged

test(superdoc): tighten assertions + adjust codecov policy#2841
caio-pizzol merged 1 commit intomainfrom
caio/superdoc-coverage-cleanup

Conversation

@caio-pizzol
Copy link
Copy Markdown
Contributor

Follow-up to #2840, addressing review feedback from an external consultation of the new test suite.

This PR stacks on top of #2840 β€” please merge #2840 first, then rebase this on main.

  • Replace tautological assertions (expect(true).toBe(true)) and does-not-throw placeholders with observable-state assertions
  • Fix window keydown listener leak in WhiteboardPage-deep tests by destroying mounted pages in afterEach
  • Rewrite the image-selection test to assert the overlay is attached to the visible layer, not just that the Transformer constructor was called
  • Trim create-app-edges from 7 queue-mechanics tests to 4 outcome tests that survive refactors of the suppression strategy
  • Migrate setTimeout(r, 0) microtask flushing to await Promise.resolve()
  • codecov.yml: set project and patch targets to 90% (from auto) β€” avoids coverage-gaming incentives and sets a sustainable bar for new code

Coverage: 91.48% (vs 91.52% on #2840 β€” 0.04pp drop from trimming 3 implementation-detail tests, a deliberate trade for better test quality). All tests pass.

Follow-up to the coverage push, addressing feedback from an external
review of the new test suite.

- Replace tautological assertions (expect(true).toBe(true)) and
  does-not-throw placeholders with observable-state assertions on
  the Delete-keydown-from-input branch and image reconciliation
- Fix window keydown listener leak in WhiteboardPage-deep tests by
  destroying mounted pages in afterEach
- Rewrite the "clicking an image selects it" test to assert the
  selection overlay was attached to the visible layer, not just
  that the Transformer constructor was invoked
- Trim create-app-edges from 7 queue-mechanics tests to 4 outcome
  tests; the suite now survives refactors of the suppression strategy
- Migrate setTimeout(r, 0) microtask flushing to await Promise.resolve()

codecov.yml: set project and patch targets to 90% (from auto). Avoids
the coverage-gaming incentives of a 95% project target on a UI-heavy
library and sets a sustainable bar for new code.
@caio-pizzol caio-pizzol force-pushed the caio/superdoc-coverage-cleanup branch from 939540b to 42a878e Compare April 16, 2026 06:48
@caio-pizzol caio-pizzol enabled auto-merge April 16, 2026 06:48
@caio-pizzol caio-pizzol added this pull request to the merge queue Apr 16, 2026
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

βœ… All modified and coverable lines are covered by tests.

πŸ“’ Thoughts on this report? Let us know!

Merged via the queue into main with commit a22c0af Apr 16, 2026
51 of 54 checks passed
@caio-pizzol caio-pizzol deleted the caio/superdoc-coverage-cleanup branch April 16, 2026 06:55
@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented Apr 16, 2026

πŸŽ‰ This PR is included in @superdoc-dev/react v1.2.0-next.17

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented Apr 16, 2026

πŸŽ‰ This PR is included in esign v2.3.0-next.20

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented Apr 16, 2026

πŸŽ‰ This PR is included in template-builder v1.5.0-next.20

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented Apr 16, 2026

πŸŽ‰ This PR is included in vscode-ext v2.3.0-next.20

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented Apr 16, 2026

πŸŽ‰ This PR is included in superdoc-cli v0.7.0-next.21

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented Apr 16, 2026

πŸŽ‰ This PR is included in superdoc v1.26.0-next.20

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented Apr 16, 2026

πŸŽ‰ This PR is included in superdoc-sdk v1.6.0-next.18

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented Apr 17, 2026

πŸŽ‰ This PR is included in superdoc-cli v0.7.0

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented Apr 17, 2026

πŸŽ‰ This PR is included in superdoc v1.27.0

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented Apr 21, 2026

πŸŽ‰ This PR is included in @superdoc-dev/react v1.2.0

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented Apr 22, 2026

πŸŽ‰ This PR is included in superdoc-sdk v1.6.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants