diff --git a/tst/functions/assertions/PesterThrow.Tests.ps1 b/tst/functions/assertions/PesterThrow.Tests.ps1 index 38eb2239d..0b15e28fd 100644 --- a/tst/functions/assertions/PesterThrow.Tests.ps1 +++ b/tst/functions/assertions/PesterThrow.Tests.ps1 @@ -287,7 +287,6 @@ InPesterModuleScope { Context 'Assertion messages' { It 'returns the correct assertion message when an exception is thrown' { $err = { { throw } | Should -Not -Throw -Because 'reason' } | Verify-AssertionFailed - write-host ($err.Exception.Message -replace "(.*)", '') $err.Exception.Message -replace "(`r|`n)" -replace '\s+', ' ' -replace ' "ScriptHalted"', '' -replace " from.*" | Verify-Equal "Expected no exception to be thrown, because reason, but an exception was thrown" } }