-
Notifications
You must be signed in to change notification settings - Fork 234
Fix #827 Pester TestName w/expandable str returns nothing #851
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
Fix #827 Pester TestName w/expandable str returns nothing #851
Conversation
This update will return null to indicate that the TestName arg was present but not something we could evaluate. The extension will see the null value and pop a dialog box.
testName = testNameStrAst.Value; | ||
return true; | ||
} | ||
else if (commandElementAst is ExpandableStringExpressionAst) |
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.
No need for the else
here -- above clause always returns
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.
This could be a pattern match too since it just tests type overloads. But I'm easy either way :)
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 + Rob's comments! Thanks for this @rkeithhill 😊
Hmm, I think the Codacy error is whacked. There are curly braces on the |
Yeah that's weird... ignore it. This looks great! |
Thanks. I'll merge this once the corresponding vscode-powerhell PR has been approved/merged. |
…othing (PowerShell#851)" This reverts commit 161a3ed.
…eturns nothing (PowerShell#851)"" This reverts commit f26755f.
This update will return null to indicate that the TestName arg was
present but not something we could evaluate. The extension will see the
null value and pop a dialog box.