Every assertion takes -Because as a named parameter, except Should-Throw, where Because is [Parameter(Position = 3)]. So Should-Throw msg errorid type reason binds the fourth positional argument to Because, which is inconsistent with the rest and easy to hit by accident.
Make -Because named only in Should-Throw, like the other assertions.
This changes positional binding, so it is technically breaking, but the new assertions are new in 6.0.0 and I think it is fine to align them in 6.1.0.
Part of the new Should-* assertion consistency audit, see #2874.
🤖
Every assertion takes
-Becauseas a named parameter, exceptShould-Throw, whereBecauseis[Parameter(Position = 3)]. SoShould-Throw msg errorid type reasonbinds the fourth positional argument toBecause, which is inconsistent with the rest and easy to hit by accident.Make
-Becausenamed only inShould-Throw, like the other assertions.This changes positional binding, so it is technically breaking, but the new assertions are new in 6.0.0 and I think it is fine to align them in 6.1.0.
Part of the new
Should-*assertion consistency audit, see #2874.🤖