You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Set-ItResult prepends a redundant "because" and appends a comma to the end of the -Because in the exception message.
Expected Behavior
Set-ItResult, when given a -Because message, should append that to the result type message
ex:
try {
Set-ItResult-Skipped -Because "we are forcing it to skip"
} catch {
$_.Exception.Message
}
Expected:
is skipped, because we are forcing it to skip
Actual:
is skipped, because because we are forcing it to skip,
Steps To Reproduce
try {
Set-ItResult-Skipped -Because "we are forcing it to skip"
} catch {
$_.Exception.Message
}
Describe your environment
Pester version : 5.6.1 C:\Users\Tyler\Documents\PowerShell\Modules\Pester\5.6.1\Pester.psm1
PowerShell version : 7.4.6
OS version : Microsoft Windows NT 10.0.19045.0
Possible Solution?
This should be a simple change to the formatting for the Because message in the Set-ItResult function to remove the redundant "because" and strip the trailing comma.
I have the changes up in a fork now and will be submitting a PR shortly.
The text was updated successfully, but these errors were encountered:
Checklist
What is the issue?
Set-ItResult
prepends a redundant "because" and appends a comma to the end of the-Because
in the exception message.Expected Behavior
Set-ItResult
, when given a-Because
message, should append that to the result type messageex:
Expected:
is skipped, because we are forcing it to skip
Actual:
Steps To Reproduce
Describe your environment
Pester version : 5.6.1 C:\Users\Tyler\Documents\PowerShell\Modules\Pester\5.6.1\Pester.psm1
PowerShell version : 7.4.6
OS version : Microsoft Windows NT 10.0.19045.0
Possible Solution?
This should be a simple change to the formatting for the Because message in the
Set-ItResult
function to remove the redundant "because" and strip the trailing comma.I have the changes up in a fork now and will be submitting a PR shortly.
The text was updated successfully, but these errors were encountered: