Skip to content

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

Merged

Conversation

rkeithhill
Copy link
Contributor

@rkeithhill rkeithhill commented Jan 17, 2019

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.

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)
Copy link
Contributor

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

Copy link
Contributor

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 :)

Copy link
Member

@TylerLeonhardt TylerLeonhardt left a 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 😊

@rkeithhill
Copy link
Contributor Author

Hmm, I think the Codacy error is whacked. There are curly braces on the if. Perhap it is thrown off by the pattern matching?

@TylerLeonhardt
Copy link
Member

Yeah that's weird... ignore it. This looks great!

@rkeithhill
Copy link
Contributor Author

Thanks. I'll merge this once the corresponding vscode-powerhell PR has been approved/merged.

@TylerLeonhardt TylerLeonhardt merged commit 161a3ed into master Jan 18, 2019
@TylerLeonhardt TylerLeonhardt deleted the rkeithhill/fix-827-pester-expandable-test-name-string branch January 18, 2019 17:44
bergmeister added a commit to bergmeister/PowerShellEditorServices that referenced this pull request Jan 22, 2019
bergmeister added a commit to bergmeister/PowerShellEditorServices that referenced this pull request Jan 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants