pester / Pester

Pester is the ubiquitous test and mock framework for PowerShell.
https://pester.dev/
Other
3.07k stars 469 forks source link

Replace New-Object calls with ::new() #2469

Closed fflaten closed 3 months ago

fflaten commented 3 months ago

PR Summary

Replaces $SafeCommands['New-Object'] calls with ::new() for improved readability and minor perf. Also removes a helper method in Pester.Factory that's no longer needed.

Leaving similar change in tests for a future PR to make sure any failures are actually code's fault.

PR Checklist