Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip blocks without runnable tests #2447

Merged
merged 6 commits into from
May 17, 2024
Merged

Conversation

fflaten
Copy link
Collaborator

@fflaten fflaten commented May 8, 2024

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

  • PR has meaningful title
  • Summary describes changes
  • 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.
  • Tests are added/update (if required)
  • Documentation is updated/added (if required)

@fflaten fflaten changed the title Skip blocks when no tests should execute Skip blocks without runnable tests May 8, 2024
Caused wrong Result as Skipped takes precedence over NotRun
src/Pester.Runtime.ps1 Outdated Show resolved Hide resolved
@fflaten fflaten marked this pull request as ready for review May 13, 2024 21:37
@fflaten
Copy link
Collaborator Author

fflaten commented May 13, 2024

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

@fflaten fflaten added this to the 6.0.0 milestone May 14, 2024
@fflaten
Copy link
Collaborator Author

fflaten commented May 15, 2024

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

@nohwnd nohwnd changed the base branch from dev/6.x.x to main May 15, 2024 07:14
@nohwnd nohwnd removed this from the 6.0.0 milestone May 15, 2024
@nohwnd nohwnd merged commit d324f29 into pester:main May 17, 2024
12 checks passed
@fflaten fflaten deleted the block-skip-if-useless branch May 17, 2024 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants