Tests/GenXdev.AI/Set-GenXdevAICommandNotFoundAction.Tests.ps1
################################################################################ Describe "Set-GenXdevAICommandNotFoundAction Set-GenXdevAICommandNotFoundAction" { BeforeAll { $script:scriptPath = GenXdev.FileSystem\Expand-Path ` "$PSScriptRoot\..\..\Functions\GenXdev.AI\Set-GenXdevAICommandNotFoundAction.ps1" } It "should pass PSScriptAnalyzer rules" { $analyzerResults = GenXdev.Coding\Invoke-GenXdevScriptAnalyzer ` -Path $script:scriptPath [string] $message = "" $analyzerResults | ForEach-Object { $message = $message + @" -------------------------------------------------- Rule: $($_.RuleName)` Description: $($_.Description) Message: $($_.Message) `r`n "@ } $analyzerResults.Count | Should -Be 0 -Because @" The following PSScriptAnalyzer rules are being violated: $message "@; } } ################################################################################ |