Skip to content

test: platform-independent mock in the config-spelling test - #218

Merged
TaekeK merged 1 commit into
mainfrom
bugfixes/config-test-separator
Oct 24, 2026
Merged

TaekeK merged 1 commit into
mainfrom
bugfixes/config-test-separator

Conversation

@TaekeK

@TaekeK TaekeK commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

Main has been red on the windows-latest leg since #217 (whose own PR run was already red there).

The test names the config as the first path spells it mocked Find-PSCxConfigFile with Split-Path -Parent, which rejoins with the platform separator. On Windows the mock answered R\One/.pscomplexity.json, so the assertion was testing the platform rather than Find-PSCxRunConfigFile. The mock now cuts at the last / itself.

Test-only: ships nothing, so no version bump or CHANGELOG entry.

Verified on Windows pwsh 7.6.8:

  • tests/ConfigFile.Tests.ps1 + tests/ParallelSafety.Tests.ps1: 54 passed, 0 failed, both containers Passed
  • tools/Invoke-PSCxAnalyzer.ps1: clean
  • PSMutant 0.9.0 scoped to src/ConfigFile.ps1: 64 / 64 killed

🤖 Generated with Claude Code

Split-Path rejoins with the platform separator, so on Windows the mock
answered 'R\One/.pscomplexity.json' and the case-insensitive config test
failed on the windows-latest leg -- testing the platform, not the code.
Red on main since #217.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@TaekeK
TaekeK merged commit 84f6d90 into main Oct 24, 2026
4 checks passed
@TaekeK
TaekeK deleted the bugfixes/config-test-separator branch October 24, 2026 10:01
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