chore: Add shared Vitest coverage config across all packages - #166
Conversation
Centralize coverage settings in @simplifying/tsconfig/vitest.shared and spread into each package's vitest.config.ts. Add turbo test:coverage task for workspace-wide coverage runs.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (2)
WalkthroughAdds a shared Vitest coverage configuration, wires it into package-level Vitest configs, adds test:coverage scripts and Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/api-server/package.json`:
- Line 19: Update the "test:coverage" npm script in package.json to include the
--passWithNoTests flag so it behaves like the other test scripts; locate the
"test:coverage" entry and append --passWithNoTests to the existing command
("vitest run --coverage") ensuring the script becomes "vitest run --coverage
--passWithNoTests" to avoid non-zero exit codes when no tests are present.
In `@packages/inbox/package.json`:
- Line 20: The "test:coverage" npm script in package.json omits the
--passWithNoTests flag; update the "test:coverage" script entry (script name
"test:coverage") to include --passWithNoTests so it matches "test" and
"test:run" and will succeed even when no tests exist, ensuring consistency
across scripts.
In `@packages/task/package.json`:
- Around line 19-20: The test:coverage npm script currently runs "vitest run
--coverage" which fails with exit code 1 when no tests exist; update the
"test:coverage" script in package.json to include the --passWithNoTests flag
(making it mirror "test:run") so it becomes "vitest run --coverage
--passWithNoTests", ensuring workspace coverage runs don't fail for packages
without tests.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 4c2a0dac-a41f-40b9-9340-bdafaa71ea0a
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml,!**/pnpm-lock.yaml
📒 Files selected for processing (28)
apps/web/package.jsonapps/web/vitest.config.tspackage.jsonpackages/api-client/package.jsonpackages/api-client/vitest.config.tspackages/api-server/package.jsonpackages/api-server/vitest.config.tspackages/calendar-sync/package.jsonpackages/calendar-sync/vitest.config.tspackages/errors/package.jsonpackages/errors/vitest.config.tspackages/event/package.jsonpackages/event/vitest.config.tspackages/inbox/package.jsonpackages/inbox/vitest.config.tspackages/job-queue/package.jsonpackages/job-queue/vitest.config.tspackages/prisma/package.jsonpackages/prisma/vitest.config.tspackages/task-group/package.jsonpackages/task-group/vitest.config.tspackages/task-sync/package.jsonpackages/task-sync/vitest.config.tspackages/task/package.jsonpackages/task/vitest.config.tspackages/tsconfig/package.jsonpackages/tsconfig/vitest.shared.tsturbo.json
… across all packages
Summary
@simplifying/tsconfig/vitest.sharedso all packages use identical coverage settings (provider, reporters, include/exclude patterns)vitest.config.tsnow imports and spreadssharedCoverageConfiginstead of duplicating settingstest:coveragetask toturbo.jsonfor workspace-wide coverage runs.tsxfilesTest plan
pnpm test:run— all existing tests passpnpm test:coverage— coverage runs across all packages via turbopnpm --filter @simplifying/task test:coverage)Summary by CodeRabbit