Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pester v5 #1444

Merged
merged 85 commits into from Jun 11, 2020
Merged

Pester v5 #1444

merged 85 commits into from Jun 11, 2020

Conversation

bergmeister
Copy link
Collaborator

@bergmeister bergmeister commented Apr 17, 2020

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
image

I suggest we wait for the GA of v5 but the PR is already ready.

PR Checklist

Christoph Bergmeister added 30 commits April 12, 2020 21:00
@bergmeister bergmeister changed the title Pester v5-rc7 Pester v5-rc8 May 14, 2020
@bergmeister bergmeister changed the title Pester v5-rc8 Pester v5-rc9 May 16, 2020
@bergmeister bergmeister changed the title Pester v5-rc9 Pester v5 May 27, 2020
@bergmeister bergmeister marked this pull request as ready for review May 27, 2020 17:20
@bergmeister
Copy link
Collaborator Author

@rjmholt @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?

Copy link
Contributor

@rjmholt rjmholt left a 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

PSCompatibilityCollector/Tests/UtilityApi.Tests.ps1 Outdated Show resolved Hide resolved
Tests/Engine/CustomizedRule.tests.ps1 Outdated Show resolved Hide resolved
Tests/Engine/InvokeScriptAnalyzer.tests.ps1 Outdated Show resolved Hide resolved
Tests/Engine/InvokeScriptAnalyzer.tests.ps1 Outdated Show resolved Hide resolved
Tests/Engine/InvokeScriptAnalyzer.tests.ps1 Outdated Show resolved Hide resolved
Tests/Engine/CustomizedRule.tests.ps1 Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants