Planning
- Milestone: Phase 4
- Priority: P2
- Size: XL (split into sub-issues by domain)
- Estimate: 13+ SP (incremental; do not big-bang to 90%)
Goal
Increase meaningful unit coverage on critical paths and raise
vitest.config.ts thresholds gradually — without chasing 90% on pages/plugins
that are already covered by E2E.
Today: ~49% lines overall (npm run test:coverage); thresholds are
10–20% (intentionally low so CI passes). Target is ~90% on chosen
modules, not 90% repo-wide in one step.
Background
Low overall % is expected while many files have 0% coverage:
app/pages/** (large, E2E-heavy)
app/plugins/**
- Many
app/utils/matrix*Permissions.ts stubs
High-value modules for unit depth first:
Follow-up to #122 and README "Test layers" section.
Scope (sub-issues to create)
Definition of Done
Nicht im Scope
- 90% on entire
app/ in one milestone
- Coverage for generated/vendor code
- Lowering E2E count to compensate
Notes
- Use
@vitest/coverage-v8 HTML report to find dead branches, not blind
assertion padding.
- Exclude truly untestable glue from
coverage.include only with justification
in issue Notes.
- Each threshold bump should be its own small PR.
Related
Planning
Goal
Increase meaningful unit coverage on critical paths and raise
vitest.config.tsthresholds gradually — without chasing 90% on pages/pluginsthat are already covered by E2E.
Today: ~49% lines overall (
npm run test:coverage); thresholds are10–20% (intentionally low so CI passes). Target is ~90% on chosen
modules, not 90% repo-wide in one step.
Background
Low overall % is expected while many files have 0% coverage:
app/pages/**(large, E2E-heavy)app/plugins/**app/utils/matrix*Permissions.tsstubsHigh-value modules for unit depth first:
app/composables/matrix/**anduseMatrixClient.tsapp/utils/chatTimeline/**Follow-up to #122 and README "Test layers" section.
Scope (sub-issues to create)
docs/testing-coverage.md; list top 10 uncovered critical filesmessages.ts,rooms,session/crypto helpers; target ≥ 80% lines in
app/composables/matrix/app/utils/chatTimeline/and core unread helpersbranches 35% after matrix + timeline slices land
get selective unit tests (not required for phase 1 merge)
Definition of Done
vitest.config.tsthresholds raised at least once with CI greenNicht im Scope
app/in one milestoneNotes
@vitest/coverage-v8HTML report to find dead branches, not blindassertion padding.
coverage.includeonly with justificationin issue Notes.
Related
test:coverageon every MR