Closed fflaten closed 1 month ago
Clever. I would not think about doing it this way. Can the warning now be removed from the assertion and throw when the options are not provided?
Yes, I can update the PR tomorrow unless you've already fixed it by then.
I won't, too many other things to fix before psconf :D
Changed to only check if parameter was not provided (allows null). PSDefaultParameters-trick didn't work for nested Compare-Equivalent
calls even if I set the default option for the caller, e.g.Compare-DictionaryEquivalent
.
Didn't bother to troubleshoot further after I noticed title change on issue #2477 planning to remove this code 🙂
PR Summary
Removes "Getting default equivalency options" warning spam in
tests.ps1
ouptut. Fixed by providing default options by... well, default inShould-BeEquivalent.Tests.ps1
.Also replaces some calls to
New-Object
PR Checklist
Create Pull Request
to mark it as a draft. PR can be markedReady for review
when it's ready.