Skip to content

Commit

Permalink
Correctly pass value to Format-Nicely
Browse files Browse the repository at this point in the history
  • Loading branch information
johlju committed Aug 23, 2024
1 parent 69d7c8a commit b9002d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/functions/assertions/PesterThrow.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@

$filterOnMessage = -not [string]::IsNullOrWhitespace($ExpectedMessage)
if ($filterOnMessage) {
$filters += "message like $(Format-Nicely [System.Management.Automation.WildcardPattern]::Unescape($ExpectedMessage))"
$filters += "message like $(Format-Nicely ([System.Management.Automation.WildcardPattern]::Unescape($ExpectedMessage)))"
if ($actualExceptionWasThrown -and (-not (Get-DoValuesMatch $actualExceptionMessage $ExpectedMessage))) {
$buts += "the message was $(Format-Nicely $actualExceptionMessage)"
}
Expand Down

0 comments on commit b9002d1

Please sign in to comment.