-
Notifications
You must be signed in to change notification settings - Fork 510
Add Launch Config Snippet for Pester Tests? #487
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
Comments
A default Pester debugging config could be nice, we just might need to make sure the user understands that they'll have to change the default test path of the config if they don't have their test files under |
I think we might be able to get away with just throwing the |
Good point, sounds good to me! |
I added this and it works but works as an accident. I specify the public async Task ExecuteScriptAtPath(string scriptPath, string arguments = null)
{
PSCommand command = new PSCommand();
if (arguments != null)
{
// If we don't escape wildcard characters in the script path, the script can
// fail to execute if say the script name was foo][.ps1.
// Related to issue #123.
string escapedScriptPath = EscapePath(scriptPath, escapeSpaces: true);
string scriptWithArgs = escapedScriptPath + " " + arguments;
command.AddScript(scriptWithArgs);
}
else
{
command.AddCommand(scriptPath);
}
await this.ExecuteCommand<object>(command, true);
} But this works only when there are no How should we proceed on this? I don't like the fact that |
@daviwil Do you know if the changes for interactive console support will still allow a |
Idea: maybe we can add an additional parameter to the launch config called "command" which takes a command name then the args parameter applies to that. That parameter and "script" would be mutually exclusive. |
You mean like this:
Great minds think alike. :-) |
I dunt reed 2 gud ;) If you want to make that change, go for it! |
OK, have implemented this and will be submitting PRs to both this repo and PSES. Came to conclusion that we don't need a Command property. I modified the PSES launch code to verify if the "script" is a path to a file or not. |
I was looking at the Node.js debugger configurations, they have one for Mocha tests:
I wonder if we should have a similar config snippet for debugging Pester tests?
The text was updated successfully, but these errors were encountered: