Skip to content

Commit

Permalink
Revert move for Where-Failed
Browse files Browse the repository at this point in the history
Has dependency on SafeCommands which are not available in Utility.
Only used by single P-test, consider inlining in testfile.
  • Loading branch information
fflaten committed Jun 30, 2024
1 parent e4ce70f commit 5045efc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 10 additions & 0 deletions src/Pester.Runtime.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2319,6 +2319,16 @@ function PostProcess-ExecutedBlock {
}
}

function Where-Failed {
[CmdletBinding()]
param (
[Parameter(Mandatory = $true, ValueFromPipeline = $true)]
$Block
)

$Block | View-Flat | & $SafeCommands['Where-Object'] { $_.ShouldRun -and (-not $_.Executed -or -not $_.Passed) }
}

function New-FilterObject {
[CmdletBinding()]
param (
Expand Down
10 changes: 0 additions & 10 deletions src/Pester.Utility.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -435,16 +435,6 @@ function Recurse-Up {
}
}

function Where-Failed {
[CmdletBinding()]
param (
[Parameter(Mandatory = $true, ValueFromPipeline = $true)]
$Block
)

$Block | View-Flat | & $SafeCommands['Where-Object'] { $_.ShouldRun -and (-not $_.Executed -or -not $_.Passed) }
}

function View-Flat {
[CmdletBinding()]
param (
Expand Down

0 comments on commit 5045efc

Please sign in to comment.