Skip to content

fix(validation): remove duplicate Test-TypedValue helper#71

Merged
HeyItsGilbert merged 1 commit into
mainfrom
worktree-tingly-twirling-pascal
May 14, 2026
Merged

fix(validation): remove duplicate Test-TypedValue helper#71
HeyItsGilbert merged 1 commit into
mainfrom
worktree-tingly-twirling-pascal

Conversation

@HeyItsGilbert
Copy link
Copy Markdown
Owner

Fixes #36.

Summary

  • Removes Test-TypedValue (private helper) and its tests. The function duplicated integer/string min/max/length/pattern checks already implemented in PropertyDefinition.Validate, with a divergent contract (throws vs Write-Warning + bool).
  • It was never called from module code — only its own test file exercised it. Test-Condition already routes validation through PropertyDefinition.Validate and uses the returned bool (Test-Condition.ps1:94-95), so removal collapses validation to one canonical contract.
  • Updates the file-layout note in CLAUDE.md to drop the reference to the removed helper.

Test plan

  • ./build.ps1 -Task Test -OutputFormat Quiet — 360 passed, 0 failed, 5 skipped
  • PSScriptAnalyzer clean

Test-TypedValue duplicated integer/string min/max/length/pattern logic
already implemented in PropertyDefinition.Validate, with a divergent
contract (throws vs Write-Warning + bool return). It was unreferenced
in the module — only its own tests exercised it. Test-Condition already
routes through PropertyDefinition.Validate, so removing the helper
collapses validation to a single canonical contract.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@HeyItsGilbert HeyItsGilbert force-pushed the worktree-tingly-twirling-pascal branch from 01385cb to 200cf6a Compare May 14, 2026 00:22
@github-actions
Copy link
Copy Markdown

Test Results

    4 files    436 suites   13s ⏱️
  374 tests   369 ✅  5 💤 0 ❌
1 472 runs  1 449 ✅ 23 💤 0 ❌

Results for commit 200cf6a.

@HeyItsGilbert HeyItsGilbert merged commit 8557938 into main May 14, 2026
6 of 7 checks passed
@HeyItsGilbert HeyItsGilbert deleted the worktree-tingly-twirling-pascal branch May 14, 2026 00:30
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.

refactor: consolidate duplicate validation logic between PropertyDefinition.Validate and Test-TypedValue

1 participant