Pester v5 by bergmeister · Pull Request #1444 · PowerShell/PSScriptAnalyzer
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
- PR has a meaningful title
- Use the present tense and imperative mood when describing your changes
- Summarized changes
- Change is not breaking
- Make sure all
.cs,.ps1and.psm1files have the correct copyright header - Make sure you've added a new test if existing tests do not effectively test the code changed and/or updated documentation
- This PR is ready to merge and is not Work in Progress.
- If the PR is work in progress, please add the prefix
WIP:to the beginning of the title and remove the prefix when the PR is ready.
- If the PR is work in progress, please add the prefix