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
Update to Pester v5 #398
Merged
Update to Pester v5 #398
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vexx32
added
Category-Koans
Invoking the Great Doubt
Category-Module
Pertaining to the module's functionality itself.
Category-Build 🚀
Modifies the build / deployment system
Category-Tests ✅
Pertaining to tests for the module functions.
PR-Awaiting-Author ✏️
Waiting on a response from the user who submitted the PR.
labels
Jun 16, 2020
vexx32
force-pushed
the
PesterV5
branch
5 times, most recently
from
June 18, 2020 17:29
648c8ea
to
03c19c8
Compare
vexx32
force-pushed
the
PesterV5
branch
3 times, most recently
from
June 19, 2020 23:16
f3243e6
to
2a9ee81
Compare
This was referenced Jun 29, 2020
- Utilize built in discovery routines for counting tests - Update Get-Karma/Show-Karma to reference correct result properties. - Update formatters to reference correct properties from result objects :recycle: Adjustments to private functions - Short circuit Get-Karma when no files found - Remove unneeded using statements from Measure-Koan - Qualify type name for SMA types in New-PSKoanErrorRecord
- Update sanity tests - Update private function tests - Update public function tests :white_check_mark: :warning: Skip Measure-Koan tests These tests are currently unstable and prone to corrupting Pester's internal state. Without a better option at the moment, we'll need to skip these tests for the time being. The function has been manually verified and seems to be more accurate than the original version.
♻️ Avoid corrupting process PSModulePath - env: provider can affect the whole process, so keep changes temporary - move PSModulePath changes to Invoke-Koan instead of New-KoanRunspace
- If PSKoans is not on the module path, Measure-Koan can fail. We can avoid this by temporarily modifying PSModulePath.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Category-Build 🚀
Modifies the build / deployment system
Category-Koans
Invoking the Great Doubt
Category-Module
Pertaining to the module's functionality itself.
Category-Tests ✅
Pertaining to tests for the module functions.
PR-Awaiting-Author ✏️
Waiting on a response from the user who submitted the PR.
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.
PR Summary
Need to update the module for Pester v5, likely both the module tests and some of the koans themselves.
Context
This will resolve #391 fully, but will be a breaking change technically since we have to move to a new major Pester version. Many of the koans should be very compatible with Pester v5, but a complete pass is needed to ensure we aren't using any patterns in the koans that will break in Pester v5.
This also updates the code used in
Measure-Koan
to utilize some internal discovery mechanics of Pester. Unfortunately, using this during an ongoing test run will corrupt Pester's internal state, so the automated tests for this function have been flagged with-Skip
for the time being, until a solution is found for that.Changes
Get-Karma
to retrieve the correct information from the new Pester result object.Checklist