-
-
Notifications
You must be signed in to change notification settings - Fork 468
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
Should -HaveParameter <parameter name> -HasArgumentCompleter does not cover all scenarios #1890
Comments
@lipkau I think you were adding this? Any ideas? |
I guess this gist on github may help in solving this issue: Get-ArgumentCompleter.ps1. |
@dtewinkel @indented-automation @lipkau Is anyone of you interested in making a PR for this? 🙂 |
I don't mind taking a look unless someone else gets there first :) |
Thank you @indented-automation. I am looking forward to the next release. |
@dtewinkel there will be at least 2 pre releases till then. Please help us test it. I will try to make one this morning. |
@nohwnd, Sure, no problem. I'll try to have a look at it and test it in my project a.s.a.p. |
@nohwnd, @indented-automation, to me it is working as expected now :-). Both for succeeding the test if the argument completer is present and for failing the test if the argument completer is missing. |
General summary of the issue
The assertion
Should -HaveParameter <parameter name> -HasArgumentCompleter
does not work for argument completers that are registered withRegister-ArgumentCompleter
.Describe your environment
Pester version : 5.1.1 C:\Users\User\Documents\PowerShell\Modules\Pester\5.1.1\Pester.psm1
PowerShell version : 7.1.3
OS version : Microsoft Windows NT 10.0.19042.0
Steps to reproduce
Expected Behavior
The test should Pass. The Argument has an argument completer.
Current Behavior
The test fails with error:
Test will succeed with using the (commented out)
ArgumentCompleter
attribute.The text was updated successfully, but these errors were encountered: