feat: add test coverage reporting with vitest#178
Open
schlpbch wants to merge 3 commits intomodelcontextprotocol:mainfrom
Open
feat: add test coverage reporting with vitest#178schlpbch wants to merge 3 commits intomodelcontextprotocol:mainfrom
schlpbch wants to merge 3 commits intomodelcontextprotocol:mainfrom
Conversation
- Install @vitest/coverage-v8 provider for code coverage analysis - Add coverage configuration to vitest.config.ts with v8 provider - Generate coverage reports in text, JSON, and HTML formats - Exclude node_modules, dist, test files, and examples from coverage - Add npm script 'test:coverage' to run tests with coverage reporting Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
… code - Add 18 tests for src/runner/utils.ts with 100% coverage - Tests for ANSI color code utility functions - Tests for output formatting and alignment - Tests for result directory creation - Add 25 tests for client scenarios - Tests for InitializeScenario, ToolsCallScenario, etc. - Verify scenario interface compliance - Test scenario initialization and methods Coverage improvements: - src/runner/utils.ts: 4.54% → 100% - src/checks/client.ts: 93.75% → 100% - initialize.ts: 11.32% → 84.9% - tools_call.ts: 14.28% → 61.9% - Overall statements: 59.16% → 63.97% - Overall branches: 45.87% → 47.73% Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Ignore generated coverage reports from vitest to avoid committing build artifacts and maintaining a cleaner repository state. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Author
|
@maciej-kisiel could you please review this PR? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add test coverage reporting infrastructure to the conformance test suite using vitest's built-in coverage support.
@vitest/coverage-v8provider for code coverage analysistest:coveragescript for convenient coverage runscoverage/to.gitignoreTest Plan
pnpm test:coverage- all 84 tests pass with coverage report generated🤖 Generated with Claude Code