-
Notifications
You must be signed in to change notification settings - Fork 273
[Chore] Separate extension unit and bundle smoke tests #1614
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| import { defineConfig, mergeConfig } from "vitest/config" | ||
|
|
||
| import baseConfig from "./vitest.config" | ||
|
|
||
| export default mergeConfig( | ||
| baseConfig, | ||
| defineConfig({ | ||
|
Check warning on line 7 in src/vitest.dist.config.ts
|
||
| test: { | ||
|
Check warning on line 8 in src/vitest.dist.config.ts
|
||
| // This smoke test validates emitted artifacts; source coverage remains in the unit lane. | ||
| include: ["__tests__/dist_assets.spec.ts"], | ||
|
Check warning on line 10 in src/vitest.dist.config.ts
|
||
| }, | ||
| }), | ||
| ) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| import { configDefaults, defineConfig, mergeConfig } from "vitest/config" | ||
|
|
||
| import baseConfig from "./vitest.config" | ||
|
|
||
| export default mergeConfig( | ||
| baseConfig, | ||
| defineConfig({ | ||
|
Check warning on line 7 in src/vitest.unit.config.ts
|
||
| test: { | ||
|
Check warning on line 8 in src/vitest.unit.config.ts
|
||
| exclude: [...configDefaults.exclude, "__tests__/dist_assets.spec.ts"], | ||
|
Check warning on line 9 in src/vitest.unit.config.ts
|
||
| coverage: { | ||
|
Check warning on line 10 in src/vitest.unit.config.ts
|
||
| reportsDirectory: "coverage/unit", | ||
|
Check warning on line 11 in src/vitest.unit.config.ts
|
||
| }, | ||
| }, | ||
| }), | ||
| ) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: Zoo-Code-Org/Zoo-Code
Length of output: 4961
🤖 get_repo_knowledge executed:
get_repo_knowledge Zoo-Code-Org/Zoo-Code /tmp/coderabbit-repo-knowledge/zoo-code-org-zoo-code-6665e61c/conventions /tmp/coderabbit-repo-knowledge/zoo-code-org-zoo-code-6665e61c/learningsLength of output: 17955
🏁 Script executed:
Repository: Zoo-Code-Org/Zoo-Code
Length of output: 2279
Produce and cache the required dist coverage.
test:distdoes not pass--coverage, so Vitest does not produce a coverage report. The dist configuration also does not setcoverage.reportsDirectory, and the Turbo task does not cachecoverage/dist.Proposed coverage fix
test: { include: ["__tests__/dist_assets.spec.ts"], + coverage: { + reportsDirectory: "coverage/dist", + }, }, - "test:dist": "vitest run --config vitest.dist.config.ts", + "test:dist": "vitest run --config vitest.dist.config.ts --coverage", "test:dist": { "dependsOn": ["bundle"], + "outputs": ["coverage/dist/**"] },📝 Committable suggestion
📍 Affects 3 files
src/vitest.dist.config.ts#L9-L9(this comment)src/package.json#L446-L446src/turbo.json#L13-L13🤖 Prompt for AI Agents
Source: MCP tools
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The requested dist coverage task is intentionally not added because this lane validates emitted files rather than imported source. Fresh profiling showed only
dist_assets.spec.tsrequiresdist/; its 40 assertions contribute no source coverage, whiletest:coverage:unitalready preserves the full prior LCOV result exactly (467 files, 22,823/30,227 covered lines). Adding--coverageand cachingcoverage/dist/**would therefore create an empty or redundant artifact and add overhead without improving coverage integrity.The focused lane still has the required correctness dependency:
pnpm turbo run test:dist --filter=zoo-code --dry-runresolveszoo-code#test:dist -> zoo-code#bundle, and the real lane passes 40/40 assertions in 438ms. Fullpnpm testalso passes 8,277 tests. Commit 8f4b0cd documents this coverage ownership in the config.Issue #116's broader assumption was recorded as superseded by measured criteria at #116 (comment). I am leaving this thread unresolved because the suggested coverage change was deliberately declined rather than implemented.