Skip to content

Update Pester to 6.0.0#751

Open
nohwnd wants to merge 6 commits into
dsccommunity:mainfrom
nohwnd:pester-6-rc
Open

Update Pester to 6.0.0#751
nohwnd wants to merge 6 commits into
dsccommunity:mainfrom
nohwnd:pester-6-rc

Conversation

@nohwnd

@nohwnd nohwnd commented Jun 28, 2026

Copy link
Copy Markdown

Pester 6.0.0 is now released 🎉 — thanks for letting me pilot the release candidates against your suite.

This updates the earlier release-candidate pin to the final 6.0.0 and keeps the test changes needed to run on Pester 6 (already in this PR). It's the same migration you'd make yourself, so you're welcome to merge it, cherry-pick just the compatibility changes, or use it purely as a reference.

Your unit tests pass on 6.0.0. The remaining red HQRM check is this repo's own custom PSScriptAnalyzer rules (e.g. Measure-Keyword), unrelated to Pester.

The real-world CI signal from this pilot was genuinely valuable in getting 6.0.0 right. Thanks for the CI time this used, and for maintaining a suite I could test against.

This PR was co-authored by GitHub Copilot.

— Jakub & Copilot


This change is Reviewable

Change RequiredModules.psd1 from the floating Pester latest pin to the 6.0.0-rc1 prerelease pin.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Jun 28, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@nohwnd, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 55 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0a32c11b-51a9-4825-af67-41cca7278945

📥 Commits

Reviewing files that changed from the base of the PR and between 1b5b3ba and eeff38a.

📒 Files selected for processing (5)
  • CHANGELOG.md
  • RequiredModules.psd1
  • tests/Unit/ActiveDirectoryDsc.Common/ActiveDirectoryDsc.Common.Tests.ps1
  • tests/Unit/MSFT_ADDomain.Tests.ps1
  • tests/Unit/MSFT_WaitForADDomain.Tests.ps1

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

nohwnd and others added 3 commits June 28, 2026 18:47
Pester v6 no longer falls through to the real command when a mock has only
-ParameterFilter behaviours and none of them match - it throws instead. Restore
the v5 behaviour the tests relied on by forwarding unmatched Test-Path calls to
the real cmdlet, and suppress unmatched Write-Verbose calls (scoping the related
Should -Invoke assertion to the asserted message so the count stays correct).
Also replace the removed Assert-VerifiableMock with Should -InvokeVerifiable.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Re-run the release-candidate pilot against Pester 6.0.0-rc2, which includes the
revert of the Should -HaveCount dictionary-counting change.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ster 6

In the 'When no domain controller is found' context, Pester 6 throws instead of
falling through to the real command when a mock has only -ParameterFilter
behaviours and none match. Add a default Write-Verbose mock to swallow the
unmatched verbose call and scope the related Should -Invoke assertion to the
asserted message so the count stays at 1.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@codecov

codecov Bot commented Jun 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99%. Comparing base (6f68181) to head (b250f49).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@         Coverage Diff         @@
##           main   #751   +/-   ##
===================================
- Coverage    99%    99%   -1%     
===================================
  Files        25     25           
  Lines      3710   3714    +4     
===================================
+ Hits       3683   3684    +1     
- Misses       27     30    +3     

see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

nohwnd and others added 2 commits July 1, 2026 09:33
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@nohwnd nohwnd changed the title [DO NOT MERGE] Pester 6.0.0 release candidate update Update Pester to 6.0.0 Jul 7, 2026
@nohwnd

nohwnd commented Jul 8, 2026

Copy link
Copy Markdown
Author

I am actually not sure how to solve the conflict. Leaving this to you to fix or close. Thanks!

@nohwnd nohwnd marked this pull request as ready for review July 8, 2026 07:22
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