#Requires -Version 5.1 $ErrorActionPreference='Stop' $root=[IO.Path]::GetFullPath((Join-Path $PSScriptRoot '..')) $files=@(Get-ChildItem -LiteralPath $root -Filter '*.ps1' -File) foreach ($directory in @('src','tests')) {$files+=@(Get-ChildItem -LiteralPath (Join-Path $root $directory) -File | Where-Object Extension -in @('.ps1','.psm1'))} foreach ($file in $files) { $tokens=$null;$errors=$null [System.Management.Automation.Language.Parser]::ParseFile($file.FullName,[ref]$tokens,[ref]$errors) | Out-Null if ($errors.Count) {throw ($errors | Out-String)} } foreach ($suite in @('Run-Tests.ps1','Run-AppTests.ps1','Run-OfflineUpdateTests.ps1','Run-FeatureTests.ps1','Run-CleanupTests.ps1')) {& (Join-Path $PSScriptRoot $suite)} Write-Output 'All checks passed. No live policy or application mutations were performed.'