Skip to content

[DO NOT MERGE] Pester 6.0.0 release candidate update#751

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

[DO NOT MERGE] Pester 6.0.0 release candidate update#751
nohwnd wants to merge 5 commits into
dsccommunity:mainfrom
nohwnd:pester-6-rc

Conversation

@nohwnd

@nohwnd nohwnd commented Jun 28, 2026

Copy link
Copy Markdown

Hi — Pester 6.0.0 is almost ready, and before I release it I'm trying it out
against real-world Pester v5 test suites.

This PR updates Pester to the 6.0.0 release candidate and makes the changes
needed for your tests to run on it. I opened it to learn two things:

  • whether migrating from v5 to v6 is straightforward, and
  • where v6 breaks or behaves differently, so I can fix those things before the
    final release instead of after.

You don't need to merge this, and I'd suggest you don't — it's only meant to
show what a v6 update would involve and to give me feedback. Please leave it
open, though: if more release candidates come out I'll push those updates here
too, and I'll close it myself afterwards.

This PR was co-authored by GitHub Copilot. If you'd rather not receive
AI-assisted PRs, just close it and I won't open one for the next release.

Thanks for the CI time this run used, and for maintaining a suite I could test
against.

— 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

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 52dbdc13-a5d0-402f-9e75-11144ae02deb

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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