vexx32 / PSKoans

A simple, fun, and interactive way to learn the PowerShell language through Pester unit testing.
GNU General Public License v3.0
1.72k stars 176 forks source link

Replace Get-Unique for unsorted lists #463

Closed johnheusinger closed 1 year ago

johnheusinger commented 3 years ago

PR Summary

Resolves #459

Context

Since Get-Unique only works on sorted lists, this check was not sufficient to ensure that no items were repeated.

Changes

Replace instances of Get-Unique with Select-Object -Unique which does not require the list to be sorted first.

Checklist