mardi 19 novembre 2019

How do I Powershell Pester Test for ThrowTerminatingError

How do I Powershell Pester Test for ThrowTerminatingError ?

catch
{
    $PSCmdlet.ThrowTerminatingError( $PSItem )
}

Output:

Missed command:

File                  Class Function          Line Command
----                  ----- --------          ---- -------
Test-ServerOnline.ps1       Test-ServerOnline   50 $PSCmdlet.ThrowTerminatingError( $PSItem )

Aucun commentaire:

Enregistrer un commentaire