pester / Pester

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

Skip blocks without runnable tests #2447

Closed fflaten closed 3 months ago

fflaten commented 3 months ago

PR Summary

Mark blocks (incl. container root) as Skip when no child tests will run. This is done to avoid running BeforeAll/AfterAll when it's not needed.

Fix #2439 Fix #2449

PR Checklist

fflaten commented 3 months ago

Ready for review, but merge pending updated base branch for v6

fflaten commented 3 months ago

@nohwnd Target this for 5.6.0 instead or wait? I'm fine with both, but shouldn't be a breaking change.