Conversation
There was a problem hiding this comment.
Pull request overview
Enables V8-based code coverage for the Vitest test suite and adjusts code to satisfy strict coverage requirements.
Changes:
- Configure Vitest to collect V8 coverage with 100% thresholds.
- Run
vitestwith--coveragein thetestonlyscript and add the V8 coverage provider dependency. - Add/adjust coverage ignore directives in a few source files.
Reviewed changes
Copilot reviewed 5 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
vitest.config.ts |
Adds V8 coverage configuration, include/exclude globs, and 100% thresholds. |
src/viz.ts |
Simplifies option passing to _renderInput; adds a coverage ignore marker for a debug-only method. |
src/instance.ts |
Adds coverage ignore markers to WASI shims used for debugging / Graphviz compatibility. |
src/dotviz-worker.ts |
Wraps the worker entrypoint in V8 ignore markers (currently untested). |
package.json |
Adds @vitest/coverage-v8 and enables coverage in testonly. |
package-lock.json |
Locks new dependency tree for coverage provider (and pins vitest to an exact version). |
.gitignore |
Ignores the coverage/ output directory. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| coverage: { | ||
| provider: 'v8', | ||
| include: ['src/**/*.ts', 'test/**/*.ts'], | ||
| exclude: ['**/*.d.ts', 'test/types/'], |
There was a problem hiding this comment.
coverage.exclude uses test/types/, but coverage.include includes test/**/*.ts. Since coverage exclusion matching is path-based, test/types/ is unlikely to exclude the TypeScript files under that directory (e.g. test/types/render-options.ts), which would cause 0% coverage and fail the 100% thresholds. Use an explicit glob like test/types/** (or alternatively remove test/**/*.ts from coverage.include if the intent is to measure only production code coverage).
| exclude: ['**/*.d.ts', 'test/types/'], | |
| exclude: ['**/*.d.ts', 'test/types/**'], |
No description provided.