GeezerVison is showing github.com — Replace Pester `-Pending` with `-Skip` in rule tests by Copilot · Pull Request #2208 · PowerShell/PSScriptAnalyzer
Conversation
Copilot
AI
commented
Aug 21, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Pester v6 removed the It -Pending parameter, but two rule tests still used it, causing test run failures unrelated to whatever change is under test.
Changes
Tests/Rules/UseIdenticalMandatoryParametersForDSC.tests.ps1: -pending → -skip.
Tests/Rules/UseToExportFieldsInManifest.tests.ps1: -pending:($IsCoreClr) → -skip:($IsCoreCLR), also correcting the casing of the automatic variable.
# before
It "suggests corrections for AliasesToExport with wildcard" -pending:($IsCoreClr) {
# after
It "suggests corrections for AliasesToExport with wildcard" -skip:($IsCoreCLR) {
Behavior is unchanged — both tests remain unexecuted, now via the supported parameter. A Pester discovery-only run reports Skip=True for both, and no other -Pending usages remain in the PowerShell test files.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Copilot
AI
changed the title
[WIP] Fix test failures due to removed -Pending in Pester v6
Replace Pester -Pending with -Skip in rule tests
Aug 21, 2026
|
kicked off tests, ok with code change. Copilot can you please resolve merge conflicts
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…est-failures
# Conflicts:
# Tests/Rules/UseIdenticalMandatoryParametersForDSC.tests.ps1
# Tests/Rules/UseToExportFieldsInManifest.tests.ps1
Co-authored-by: bergmeister <[email protected]>
kicked off tests, ok with code change. Copilot can you please resolve merge conflicts
Merged origin/main and resolved the conflicts in 85463f9.
Both conflicts were in the same two lines this PR touches — main has since landed an equivalent -Pending → -Skip change, so I resolved by taking main's version (-Skip / -Skip:($IsCoreClr)). The branch tree is now identical to origin/main, i.e. git diff origin/main is empty, so this PR no longer carries any change of its own and can be closed unless you want to keep the merge commit for history. Pester discovery still reports both tests as skipped.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Copilot diff shows no changes at all in this PR, did you undo your work when you resolved merge conflict?
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Copilot diff shows no changes at all in this PR, did you undo your work when you resolved merge conflict?
No, nothing was undone — the same fix landed on main independently while this PR was open, so there's genuinely nothing left for it to change.
The commit on main is faad3a4, "Upgrade Pester to version 6.0.1 in CI workflow and documentation (#2194)" by Liam Peters (2026-08-26). Its diff includes exactly the two lines this PR targeted:
- It "Should find a violations" -pending {
+ It "Should find a violations" -Skip {
- It "suggests corrections for AliasesToExport with wildcard" -pending:($IsCoreClr) {
+ It "suggests corrections for AliasesToExport with wildcard" -Skip:($IsCoreClr) {
That's why the merge conflicted on those exact lines and only those lines: both sides changed -pending → -Skip, differing only in casing. I resolved in favour of main's version rather than re-introducing a purely cosmetic casing difference, which is what leaves the PR diff empty.
Current state on this branch — git diff origin/main is empty, the files contain -Skip / -Skip:($IsCoreClr), and a repo-wide search finds no remaining It -Pending usages (the only Pending hits are unrelated -PendingClientTimeoutInSeconds entries in Engine/Settings/*.json).
So the issue is already fixed on main via #2194, and this PR can be closed as superseded. If you'd rather it carry a change of its own, the only thing left is the cosmetic $IsCoreClr → $IsCoreCLR casing fix for the automatic variable — say the word and I'll push that.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Copilot diff shows no changes at all in this PR, did you undo your work when you resolved merge conflict?
No, nothing was undone — the same fix landed on main independently while this PR was open, so there's genuinely nothing left for it to change.
The commit on main is faad3a4, "Upgrade Pester to version 6.0.1 in CI workflow and documentation (#2194)" by Liam Peters (2026-08-26). Its diff includes exactly the two lines this PR targeted:
- It "Should find a violations" -pending {
+ It "Should find a violations" -Skip {
- It "suggests corrections for AliasesToExport with wildcard" -pending:($IsCoreClr) {
+ It "suggests corrections for AliasesToExport with wildcard" -Skip:($IsCoreClr) {
That's why the merge conflicted on those exact lines and only those lines: both sides changed -pending → -Skip, differing only in casing. I resolved in favour of main's version rather than re-introducing a purely cosmetic casing difference, which is what leaves the PR diff empty.
Current state on this branch — git diff origin/main is empty, the files contain -Skip / -Skip:($IsCoreClr), and a repo-wide search finds no remaining It -Pending usages (the only Pending hits are unrelated -PendingClientTimeoutInSeconds entries in Engine/Settings/*.json).
So the issue is already fixed on main via #2194, and this PR can be closed as superseded. If you'd rather it carry a change of its own, the only thing left is the cosmetic $IsCoreClr → $IsCoreCLR casing fix for the automatic variable — say the word and I'll push that.
Andy Jordan (@andyleejordan) it seems your PR has been superseded by #2194
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
Copilot will automatically review once the pull request is marked ready for review
At least 1 approving review is required to merge this pull request.
Uh oh!
There was an error while loading. Please reload this page.
Milestone
No milestone
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.
|