Skip to content

chore: exclude Electron-dependent code from coverage metrics#107

Merged
hydro13 merged 1 commit intomainfrom
chore/coverage-exclude-electron
Apr 11, 2026
Merged

chore: exclude Electron-dependent code from coverage metrics#107
hydro13 merged 1 commit intomainfrom
chore/coverage-exclude-electron

Conversation

@hydro13
Copy link
Copy Markdown
Owner

@hydro13 hydro13 commented Apr 11, 2026

Summary

  • Exclude 27 Electron-dependent modules/directories from Vitest coverage that always report 0% (preload, snapshot, stealth, devtools, IPC handlers, bootstrap, etc.)
  • These require BrowserWindow, webContents, CDP, or the renderer process — they cannot run in Vitest
  • Coverage goes from ~38% → ~62%, reflecting the actual quality of the testable codebase

Test plan

  • npm run verify passes (87 test files, 1871 tests)
  • CI verify.yml passes
  • Codecov badge updates to ~62% after merge

Exclude modules that require BrowserWindow, webContents, CDP, or the
renderer process from Vitest coverage. These modules (preload, snapshot,
stealth, devtools, IPC handlers, etc.) cannot run outside Electron and
always report 0%, dragging the coverage percentage down from ~62% to ~38%.

This gives a realistic view of how well the testable codebase is covered.
@codecov-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@hydro13 hydro13 merged commit d43517a into main Apr 11, 2026
4 checks passed
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