chore: add test coverage measurement - #3362
Conversation
Wire coverage collection, reporting, and a non-failing CI signal to establish a baseline. No threshold gate — coverage never blocks merge. - jest.config.js: root-level collectCoverageFrom across src/**, with text-summary/lcov/json-summary reporters - package.json: add test:coverage script (test left untouched) - validate-pr.yml: run test:coverage, upload coverage/ as artifact (Linux-only, non-blocking) - .gitignore: ignore /coverage Baseline: 17.15% lines, 17.67% statements, 13.18% branches, 11.87% functions (282 pass, 2 skip).
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📜 Recent review details⏰ Context from checks skipped due to timeout. (3)
🔇 Additional comments (4)
WalkthroughAdds Jest code coverage configuration ( ChangesCoverage Reporting Setup
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
What
Wires test coverage collection and reporting to establish a baseline. Measurement only — no threshold gate, so coverage never blocks a merge.
Starting coverage (baseline)
Measured locally with the new
yarn test:coverage(282 pass, 2 skip):The denominator includes currently-untested directories (
src/store/,src/ipc/,src/logging/, etc.), so this is a real coverage figure, not a tested-files ratio.Changes
jest.config.js— root-levelcollectCoverageFromacrosssrc/**/*.{ts,tsx}(excludes specs,.d.ts,.jest,public); reporterstext-summary+lcov+json-summary; output tocoverage/. NocoverageThreshold— deliberate.package.json— addstest:coverage(same flags astest+--coverage).testleft untouched so the default path stays fast..github/workflows/validate-pr.yml— runsyarn test:coverage; uploadscoverage/as an artifact (Linux-only,always(), non-blocking)..gitignore— ignores/coverage.Notes
@kayahr/jest-electron-runner(both main + renderer projects) — no v8 fallback needed.CODECOV_TOKENsecret. Swap tocodecov-actionlater if inline PR deltas / trend graphs are wanted.Follow-ups (out of scope here)
store/,ipc/,logging/privacy,utils/versionUtils, navigation reducers).coverageThresholdfloor and ratchet it up per PR.Summary by CodeRabbit
Tests
Chores