Skip to content

test: add unit tests for ConfigManager and FileProcessor#64

Open
MaxwellCalkin wants to merge 1 commit intosensay-io:mainfrom
MaxwellCalkin:test/config-manager-unit-tests
Open

test: add unit tests for ConfigManager and FileProcessor#64
MaxwellCalkin wants to merge 1 commit intosensay-io:mainfrom
MaxwellCalkin:test/config-manager-unit-tests

Conversation

@MaxwellCalkin
Copy link
Copy Markdown

Summary

  • Adds 31 new unit tests for two core modules with zero prior coverage
  • ConfigManager (18 tests): config loading, saving, merging, environment variable reading, and priority chain verification (env > project > user)
  • FileProcessor (13 tests): file size formatting, system message reading, training file scanning with recursive directory support, file type filtering, and size limit enforcement
  • Total test count goes from 12 to 43 (3.6x increase)

Partial progress on #4 (automated testing).

Test plan

  • All 43 tests pass locally (npx jest)
  • No changes to production code
  • Tests mock fs-extra to avoid filesystem side effects

🤖 Generated with Claude Code

Add 31 new unit tests covering:
- ConfigManager: getUserConfig, saveUserConfig, getProjectConfig,
  saveProjectConfig, getMergedConfig, getConfigFromEnv, getEffectiveConfig
  including config priority chain (env > project > user)
- FileProcessor: formatFileSize, readSystemMessage, scanTrainingFiles,
  displayFilesSummary including recursive directory scanning and
  file size limit enforcement

Total test count: 43 (up from 12)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant