Add Vitest test suite with 96 tests - #5
Merged
Conversation
- Configure Vitest for ESM TypeScript - Add tests for config loader (7 tests) - Add tests for themes module (37 tests) - Add tests for claude-hook utilities (21 tests) - Add tests for environment utilities (10 tests) - Add tests for renderer (21 tests) Test coverage includes: - Config file loading and merging - Theme retrieval and structure validation - Model name formatting - Segment rendering and ordering - Trend arrows and compact mode - Warning/critical color states 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Use correct interface properties (resetAt, isRealtime) instead of non-existent ones (currentUsage, limit). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Document Vitest setup, test commands, and test structure. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
New test files: - src/segments/block.test.ts (8 tests) - src/segments/weekly.test.ts (10 tests) - src/utils/oauth.test.ts (10 tests) - src/utils/terminal.test.ts (13 tests) - src/utils/logger.test.ts (8 tests) Updated tests: - src/utils/environment.test.ts (+10 tests for git functions) Coverage improvements: - Segments: 0% → 85% - Utils: 20% → 43% - Overall: 45% → 69% Total: 155 tests passing 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Update test count from 96 to 155 - Add all 10 test files to the table - Document segments and utils tests 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Tests must pass for CI to succeed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Use forward slashes instead of backslashes since path.basename on Linux doesn't recognize backslash as a path separator. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
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
Adds comprehensive test suite using Vitest with 155 tests across 10 test files.
Test Coverage
Coverage Summary
New Scripts
Test Results
Test plan
🤖 Generated with Claude Code