Tests/GenXdev.Helpers/Get-ImageGeolocation.Tests.ps1
################################################################################ Describe "Get-ImageGeolocation.Tests" { It "Should pass PSScriptAnalyzer rules" { # Define the full module name variable $FullModuleName = "GenXdev.Helpers" # get the script path for analysis $scriptPath = GenXdev.FileSystem\Expand-Path "$PSScriptRoot\..\..\Functions\$FullModuleName\Get-ImageGeolocation.ps1" # run analyzer with explicit settings $analyzerResults = GenXdev.Coding\Invoke-GenXdevScriptAnalyzer ` -Path $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 "@; } } ################################################################################ |