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

Do not cleanup previous mocks in inner Invoke-Pester #2337

Merged
merged 2 commits into from
May 6, 2023

Conversation

fflaten
Copy link
Collaborator

@fflaten fflaten commented Apr 12, 2023

PR Summary

Ignores mock cleanup on start when in a nested Invoke-Pester run.

Fix #2074

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 Avoid mock cleanup with nested runs Do not cleanup outer mocks in inner Invoke-Pester Apr 12, 2023
@fflaten fflaten marked this pull request as ready for review April 12, 2023 21:41
@fflaten fflaten changed the title Do not cleanup outer mocks in inner Invoke-Pester Do not cleanup previous mocks in inner Invoke-Pester Apr 13, 2023
@nohwnd nohwnd merged commit e1f2361 into pester:main May 6, 2023
@fflaten fflaten deleted the mock-nestedrun branch May 6, 2023 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

If Invoke-Pester is called, the previous Mock will be invalidated
2 participants