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
[x] PR has meaningful title
[x] Summary describes changes
[x] PR is ready to be merged
If not, use the arrow next to Create Pull Request to mark it as a draft. PR can be marked Ready for review when it's ready.
PR Summary
Replaces
$SafeCommands['New-Object']
calls with::new()
for improved readability and minor perf. Also removes a helper method inPester.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
Create Pull Request
to mark it as a draft. PR can be markedReady for review
when it's ready.