tests/BrowserCache.Tests.ps1
|
$moduleRoot = Split-Path -Parent $PSScriptRoot Import-Module (Join-Path $moduleRoot 'Octa.psd1') -Force Describe 'Get-OctaCleanupTargets browser cache targets (007 US2)' { $targets = Get-OctaCleanupTargets $browserNames = @('Edge cache', 'Chrome cache', 'Firefox cache') It 'never throws while measuring browser caches' { { Get-OctaCleanupTargets } | Should Not Throw } It 'reports real non-negative bytes for every present browser, and omits absent ones' { foreach ($name in $browserNames) { $target = $targets | Where-Object { $_.Name -eq $name } if ($target) { $target.MeasuredBytes | Should BeGreaterThan -1 } } } } |