refactor(code): reorganize test structure to test/ directory#21
Merged
Conversation
- Moved all tests from src/__tests__/ to test/unit/ and test/integration/ - Created new utils package with extracted utilities: - parseArgs function with bug fix for flag value parsing - Platform detection utilities - Fixed CLI -v/--version and -h/--help flag handling - Updated package.json test script to bun test ./test - Reorganized test structure: unit tests in test/unit/, integration tests in test/integration/ - All 87 tests passing with new structure
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #21 +/- ##
==========================================
+ Coverage 29.72% 34.68% +4.96%
==========================================
Files 4 13 +9
Lines 1904 2606 +702
==========================================
+ Hits 566 904 +338
- Misses 1338 1702 +364 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Document fallback behavior in platform detection with better comments - Preserve JSON parse error context in cli.ts for better debugging - Add tests for flag precedence over commands (--version, --help) - Add tests for environment variable priority (CODE_PROJECT_PATH)
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
Reorganized test structure for packages/code to follow better organization patterns with dedicated test directories.
src/__tests__/totest/directorytest/unit/andtest/integration/src/utils/args.tswith bug fix for flag value parsingsrc/utils/platform.ts-v/--versionand-h/--helpflag handlingbun test ./testTest plan
versioncommand and-v/--versionflagshelpcommand and-h/--helpflags