-
Notifications
You must be signed in to change notification settings - Fork 498
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
Single quotes inside Pester test names prevent tests from running #1725
Comments
We're probably not escaping the string in the Describe block properly. Thanks for opening this! |
Yup. Using line numbers to run/debug individual tests is looking better and better. :-) |
One comment from my side: It's still possible to resolve this error if your test looks somewhat like this
After some trial and error it turned out the issue is the If I add an artificatial space in the end it works:
Fyi ;) |
Thank you for your comment, but please note that this issue has been closed for over a week. For better visibility, consider opening a new issue with a link to this instead. |
Issue Description
The "Run Tests" or "Debug Tests" option appearing above Pester Describe blocks does not work when the string contains a single quote. vscode-powershell appears to be neglecting to escape them when issuing a shell command to run the tests.
Working test yields:
And broken test:
I'm still using version 3.4.0 of Pester, if that matters. The tests run fine when I call
Invoke-Pester
in the console.Environment Information
Visual Studio Code
PowerShell Information
Visual Studio Code Extensions
Visual Studio Code Extensions(Click to Expand)
(All other extensions manually disabled to confirm no interference)
The text was updated successfully, but these errors were encountered: