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

Remove Should legacy syntax error #2445

Merged
merged 2 commits into from May 17, 2024
Merged

Conversation

fflaten
Copy link
Collaborator

@fflaten fflaten commented May 7, 2024

PR Summary

Removes the custom exception thrown when calling Should with legacy Pester 3 syntax. The syntax is not supported and the custom error caused too many false positives.

Before:

> 1 | Should Be 2
Should: Cannot retrieve the dynamic parameters for the cmdlet. Legacy Should syntax (without dashes) is not supported in Pester 5. Please refer to migration guide at: https://pester.dev/docs/migrations/v3-to-v4

After:

> 1 | Should Be 2                               
Should: Parameter set cannot be resolved using the specified named parameters. One or more parameters issued cannot be used together or an insufficient number of parameters were provided.

Fix #2437
Fix #2138

Note

If rollback becomes necessary, include code in #2325 to fix #2138

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
Copy link
Collaborator Author

fflaten commented May 7, 2024

Do we need to update the dev/6.x.x branch before merging any PRs? Merging dev with main would keep PS3 support atm since it was reverted in main only.

@fflaten fflaten added this to the 6.0.0 milestone May 7, 2024
@nohwnd
Copy link
Member

nohwnd commented May 13, 2024

Definitely, I wanted to merge main into dev/6.x.x but I think it wanted a merge commit, which did not seem right. So I want to soon (tomorrow?) release final preview of 5.x.x, and snap release branch for it, and then move main to 6.x.x and re-apply the changes, hopefully without much mess.

@nohwnd nohwnd changed the base branch from dev/6.x.x to main May 17, 2024 19:51
@nohwnd nohwnd merged commit 8fd708a into pester:main May 17, 2024
9 checks passed
@fflaten fflaten deleted the remove-should-legacy branch May 17, 2024 20:23
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