GeezerVison is showing github.com — Pester v5 by bergmeister · Pull Request #1444 · PowerShell/PSScriptAnalyzer
Conversation
PR Summary
Migration to use new Pester v5.
It has cleaner scoping and test setup has to go into a BeforeAll block, except for things that need to be evaluated at discovery time (therefore test cases also had to be inlined), see https://github.com/pester/Pester/blob/v5.0/README.md
Some cleanup had to be done as part of it. PSScriptAnalyzer is now only imported once before running tests (import is needed as some tests reference the PSSA types). Some tests were also cleaned up to not depend on PSScriptAnalyzerTestHelper.psm1 any more. I also started adding the Copyright header to the test files. The speed of test execution is roughly the same as v4.
A diff that ignores indentation/whitespace will make the review much easier

I suggest we wait for the GA of v5 but the PR is already ready.
PR Checklist
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…some -Skip problems already
… into pesterv5PoC
# Conflicts:
# Tests/Rules/UseUsingScopeModifierInNewRunspaces.tests.ps1
|
Rob Holt (@rjmholt) James Truher (@JamesWTruher) Pester v5 has released today after multiple RC iterations. It's much cleaner but a tad slower, especially on PowerShell 5.1, which hasn't back-ported the speculative execution perf fix PowerShell/PowerShell#10269
Do you think it's worthwhile merging already as it might make porting of tests to PSSA v2 test easier/cleaner?
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Part way through the review, will continue later
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
bergmeister reacted with thumbs up emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
1 more reviewer
Reviewers whose approvals may not affect merge requirements
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.