test: add comprehensive config module tests - #77
Closed
TerminalGravity wants to merge 2 commits into
Closed
Conversation
Add 12 tests covering: - Default config when no .preflight/ dir or env vars - Env var overrides (profile, related projects, embeddings) - Invalid env var values ignored gracefully - .preflight/config.yml loading and merging with defaults - .preflight/triage.yml loading - .preflight/ dir takes precedence over env vars - Malformed YAML handled gracefully (no crash) - hasPreflightConfig() detection - getRelatedProjects() backward compat helper Brings test count from 43 to 55.
Adds examples/.preflight/ with ready-to-copy config files: - config.yml: profile, related projects, thresholds, embeddings - triage.yml: always_check/skip/cross_service keywords, strictness - contracts/api.yml: manual contract definition examples Also adds a 'Quick Setup' section to README pointing to the examples.
Collaborator
Author
|
Config module tests — CI green. ✅ |
Collaborator
Author
|
Superseded by newer, more comprehensive test PRs. |
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.
Adds 12 tests for
src/lib/config.ts— previously had zero test coverage.Covers:
.preflight/config.ymland.preflight/triage.ymlloading.preflight/dir takes precedence over env varshasPreflightConfig()andgetRelatedProjects()helpersTest count: 43 → 55