-
Notifications
You must be signed in to change notification settings - Fork 394
Update from Pester 4.1.1 to 4.3.1 and use new -BeTrue and -BeFalse operators #906
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
Conversation
… assertions and remove deprecated Should -Not -Throw calls
Tests/Engine/Extensions.tests.ps1
Outdated
@@ -118,7 +118,7 @@ Describe "AttributeAst extension methods" { | |||
param($param1, $param2) | |||
}}.Ast.EndBlock.Statements[0] | |||
$extNamespace::IsCmdletBindingAttributeAst($funcDefnAst.Body.ParamBlock.Attributes[0]) | | |||
Should -Be $true | |||
Should BeTrue |
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.
should this be -BeTrue
?
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.
Yes! Thanks, I fixed it.
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.
LGTM
as soon as ci completes successfully, I'll merge |
@JamesWTruher On the branch commit and the one that got merged into development, the WMF4 build got cancelled, see here. I assume that was a manual action or is there a problem with the image? I saw that many repos with custom images or ci machines (like e.g. Pester) currently have problems due to the recent breaking change by GitHub that requires the latest update of the Windows Git client. |
PR Summary
Pester released 2 new versions this week with new assertion operators.
Should -Be $true
to new operatorShould BeTrue
and similar forShould BeFalse
that were added in 4.2Should -Not -Throw
got officially deprecated in 4.2 -> remove assertion because when an exception is thrown, it automatically means that the test should not pass as recommended in the Pester release notes-HaveCount
operator (yet) because existing tests need adaption (and I also suspect a bug in the new operator I raised the first issue here). This also keeps the diff relatively small.PR Checklist
Note: Tick the boxes below that apply to this pull request by putting an
x
between the square brackets. Please mark anything not applicable to this PRNA
.WIP:
to the beginning of the title and remove the prefix when the PR is ready