Repository navigation
test: platform-independent mock in the config-spelling test - #218
Merged
Merged
Conversation
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>
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.
Main has been red on the
windows-latestleg since #217 (whose own PR run was already red there).The test names the config as the first path spells it mocked
Find-PSCxConfigFilewithSplit-Path -Parent, which rejoins with the platform separator. On Windows the mock answeredR\One/.pscomplexity.json, so the assertion was testing the platform rather thanFind-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 Passedtools/Invoke-PSCxAnalyzer.ps1: cleansrc/ConfigFile.ps1: 64 / 64 killed🤖 Generated with Claude Code