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

Support Should -HaveParameter -DefaultValue for AliasInfo and scripts #2353

Merged
merged 5 commits into from
Jun 7, 2023

Conversation

fflaten
Copy link
Collaborator

@fflaten fflaten commented May 18, 2023

PR Summary

This PR enhances Should -HaveParameter assertion with:

  • Throws exception when -DefaultValue is used with unsupported command types like binary cmdlet
  • Throws exception when ApplicationInfo-object is used as input value to Should -HaveParameter
  • Adds support for using -DefaultValue when provided resolvable AliasInfo.
  • Adds support for using -DefaultValue with script parameters (HaveParameter is not dependent on format of param block #2288 (comment))

Fix #2286
Fix #2290

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 added Feature Bug Assertions For issues related with assertions labels May 18, 2023
@fflaten fflaten changed the title Support Should -HaveParameter -DefaultValue for alias and scripts Fix Should -HaveParameter -DefaultValue for alias and scripts May 18, 2023
@fflaten fflaten changed the title Fix Should -HaveParameter -DefaultValue for alias and scripts Fix Should -HaveParameter -DefaultValue for AliasInfo and scripts May 18, 2023
@fflaten fflaten changed the title Fix Should -HaveParameter -DefaultValue for AliasInfo and scripts Support Should -HaveParameter -DefaultValue for AliasInfo and scripts May 18, 2023
@nohwnd nohwnd merged commit ea70451 into pester:main Jun 7, 2023
@fflaten fflaten deleted the haveparameter-fix branch June 7, 2023 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Assertions For issues related with assertions Bug Feature
Projects
None yet
2 participants