Skip to content

test: raise coverage to 95% across all metrics#179

Merged
WiktorStarczewski merged 7 commits intomainfrom
wiktor-cov
Apr 10, 2026
Merged

test: raise coverage to 95% across all metrics#179
WiktorStarczewski merged 7 commits intomainfrom
wiktor-cov

Conversation

@WiktorStarczewski
Copy link
Copy Markdown
Collaborator

Summary

  • Raise jest coverageThreshold to 95% for statements, branches, functions, and lines
  • Rename CI coverage job to "Coverage Check (95% minimum)" in pr.yml
  • Add 562 new tests across 30 new test files and extend 32 existing test files
  • Fix jest.setup.js crypto polyfill (defineProperty instead of Object.assign) and add TextEncoder/TextDecoder for jsdom
  • Remove dead code in dapp.ts (unreachable branch guards, redundant ternaries)
  • Add /* c8 ignore */ for fundamentally untestable branches (SSR guards, build-time constants, re-entrancy guards)

Coverage before → after

Metric Before After
Statements 73.74% 95.74%
Branches 86.16% 95.34%
Functions 66.57% 95.69%
Lines 73.74% 95.74%
Tests 1,079 1,641

Test plan

  • All 1,641 tests pass (yarn test)
  • yarn test:coverage passes at the 95% threshold
  • No source logic changed (only test files, jest config, CI workflow, and dead-code removal)

…93%)

- Raise jest coverageThreshold to 95% across all metrics
- Rename CI job to "Coverage Check (95% minimum)"
- Add 24 new test files and extend 10 existing ones (+405 tests)
- Fix jest.setup.js crypto polyfill (defineProperty instead of Object.assign)
- Add TextEncoder/TextDecoder polyfill for jsdom
- Coverage: 93.59% lines, 90.05% branches, 93.40% functions
@WiktorStarczewski WiktorStarczewski added the no changelog Skip changelog check for trivial changes label Apr 10, 2026
@WiktorStarczewski WiktorStarczewski merged commit ac8e32d into main Apr 10, 2026
10 checks passed
@WiktorStarczewski WiktorStarczewski deleted the wiktor-cov branch April 10, 2026 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changelog Skip changelog check for trivial changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant