Skip to content

Conversation

@MariusStorhaug
Copy link
Member

@MariusStorhaug MariusStorhaug commented Jan 28, 2026

Summary

Refactors Get-AggregatedStatus.ps1 to align with the improved implementation pattern used in Invoke-Pester/tests/Test-ActionResults.ps1.

Changes

Refactored

  • Test aggregation script: Restructured to use cleaner data patterns and improved code organization

Details

  • Added proper script header with comment-based help, [CmdletBinding()], and param()
  • Replaced pre-computed variables with nested hashtable structure (@{ Actual = ...; Expected = ... })
  • Separated job data from presentation by processing into a $results array with computed pass values
  • Changed iteration from ForEach-Object to foreach for better readability
  • Changed Write-Warning to Write-Error for actual validation failures
  • Removed redundant debug statements
  • Added | Out-String to Format-List for proper output
  • Updated summary table to use $results instead of raw $jobs

Type of Change

  • ⚙️ Maintenance - Test infrastructure improvements

@MariusStorhaug MariusStorhaug changed the title 🩹 [Patch]: Refactor test result aggregation script ⚙️ [Maintenance]: Refactor test result aggregation script Jan 28, 2026
@MariusStorhaug MariusStorhaug marked this pull request as ready for review January 28, 2026 10:57
Copilot AI review requested due to automatic review settings January 28, 2026 10:57
@MariusStorhaug MariusStorhaug merged commit 6f784e9 into main Jan 28, 2026
25 checks passed
@MariusStorhaug MariusStorhaug deleted the updateTest branch January 28, 2026 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants