Skip to content

Migrate tests to v6 assertions#2875

Draft
fflaten wants to merge 6 commits into
pester:mainfrom
fflaten:test-v6
Draft

Migrate tests to v6 assertions#2875
fflaten wants to merge 6 commits into
pester:mainfrom
fflaten:test-v6

Conversation

@fflaten

@fflaten fflaten commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

PR Summary

Start migrating tests in the repo to Should-* assertions.

Not covered:

  • Tests in assert and assertions folders which test themselves and should use Verify-*.
  • Should -Not -Throw. I like the errors with -Because 🙂
  • Should -Exist. No equivalent and I like the path-specific error message.
  • Should -Invoke. Should-Invoke syntax has own tests, but not Should -Invoke which relies on Mock.Tests.ps1

PR Checklist

  • PR has meaningful title
  • Summary describes changes
  • PR is ready to be merged
    • If not, use the arrow next to Create Pull Request to mark it as a draft. PR can be marked Ready for review when it's ready.
  • Tests are added/update (if required)
  • Documentation is updated/added (if required)

@fflaten

fflaten commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator Author

Identified a few issues during this dogfooding: #2872, #2873 and #2874 + notes in not covered section above

Pester.Tests.ps1 should also be cleaned up. PSv3 guards and use of script variables (= test order dependency) #2877

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