diff --git a/src/pester-tests/Test-Format-List.Tests.ps1 b/src/pester-tests/Test-Format-List.Tests.ps1 index 4b9deeaf1..6be3cf037 100644 --- a/src/pester-tests/Test-Format-List.Tests.ps1 +++ b/src/pester-tests/Test-Format-List.Tests.ps1 @@ -57,17 +57,7 @@ Describe "Test-Format-List" { } It "Should not show anything other than the requested props" { - <# the structure of the output of format-list, although iterable, is not a proper collection of - objects we can test - - gps | fl | ForEach-Object{$_.ToString()} confirms that each item is a format object. - - (Get-Process | Format-List | Out-String).split("\n") | ForEach-Object { $_} will list objects, - but not allow interaction with them. - #> - - ( Get-Process | Format-List | Out-String).Contains("CPU") | Should Be $true - + ( Get-Process | Format-List | Out-String) | Should Match "CPU" $output = ( Get-Process | Format-List -Property Name | Out-String)