-
Notifications
You must be signed in to change notification settings - Fork 893
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
Add tab completion test for PowerShell #1629
Conversation
Using Pester and AppVeyor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Thank you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm grateful for the test, but the concern I raised would prevent me from approving. The test is just too brittle as it is written.
To avoid over-specify testing.
$result[22].CompletionText | Should Be 'which' | ||
|
||
# Keep it simple because over-specify testing might be risky | ||
$result.Count | Should -BeGreaterThan 10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a "More than 10" type test.
$result.CompletionText | Should -Contain 'uninstall' | ||
$result.CompletionText | Should -Contain 'update' | ||
$result.CompletionText | Should -Contain '--help' | ||
$result.CompletionText | Should -Contain '--verbose' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should -Contain
can verify elements of an array ignoring order.
Nice, thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Thank you! |
Using Pester and AppVeyor. Related to #1623.