-
-
Notifications
You must be signed in to change notification settings - Fork 476
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 : Legacy Should syntax (without dashes) is not supported in Pester 5 #1590
Comments
I am not sure what you are saying. How can the message be improved? |
Legacy Should syntax (without dashes) appears to suggest -Should have a dash. Could be useful if the error message suggested a correction in addition to linking to a URL. Could be just me! Suggested error.
My first instinct with current phrasing was to add hyphen to -Should when it is the -Be (or any operator following should) that needs to be fixed. The details of the error could provide an offline experience to get help on the mitigation of error. |
I don't think Should has ever needed a "-" Should is a Powershell command so it doesn't need one. |
Perhaps this issue should -be focused more on documentation. Is there a separate issue for this? If so could probably close this issue? get-help should -examples should return examples. get-help should -online should point to https://pester.dev/docs/usage/assertions and not the wiki. |
Closing for #1634 |
1. General summary of the issue
This is a minor detail which might help with upgrade path.
Message
Is not intuitive.
eg.
Should -Be
works.
Is Should supported without dashes and -Be is not?
2. Describe Your Environment
Pester 5.0.1
3. Expected Behavior
Further details/clarity on change or utility to autofix/upgrade script via Pester.
4.Current Behavior
Link to upgrade document.
5. Possible Solution
Error message could be rephrased as Should is supported without dashes, the Be is not.
Would be great if there was autofix for this and details in the error of line contents containing the invalid syntax.
Is this linted/scanned in VSCode?
6. Context
The text was updated successfully, but these errors were encountered: