Skip to content
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

Configuration setting for Pester path #108

Closed
johlju opened this issue Mar 19, 2022 · 2 comments · Fixed by #111
Closed

Configuration setting for Pester path #108

johlju opened this issue Mar 19, 2022 · 2 comments · Fixed by #111
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@johlju
Copy link
Contributor

johlju commented Mar 19, 2022

Could we add a configuration setting PesterModulePath so it can be specified relative to the project path where the Pester module is located, and so Pester Test Adapter does not assume it is in $env:PSModulePath?

@JustinGrote
Copy link
Collaborator

I can't say I will make this a priority since you can do it as part of your discovery or test run phase, other than if you want to use a custom version of pester not already on your psmodulepath. I'll put it on the to-do stack though :)

@JustinGrote JustinGrote added enhancement New feature or request help wanted Extra attention is needed labels Mar 21, 2022
@johlju
Copy link
Contributor Author

johlju commented Mar 21, 2022

I’m happy you put it on the back log. Thank you. 😊 Wish I could help but don’t know where to start. 😊

Some more information, that you probably already know. The problem is that the Pester Test Adapter adapter do not work unless it has Pester in the PSModulePath, if Pester is not available it will not run discovery since it does this (and of course invokes Pester) prior to discovery:

$config = New-PesterConfiguration @{

with a configuration option we could import the Pester module from a custom relative path so that a user does not need to install the Pester module in a PSModulePath.

This will help us since our pipeline is using PSDepend that downloads the (Pester module) version specified in a configuration file to a relative path to the local repository root. If this configuration option was a reality we would not need to first install Pester in PSModulePath. We could just resolve dependencies prior to starting VS Code.

JustinGrote pushed a commit that referenced this issue Mar 27, 2022
Adds a new configuration property PesterModulePath to enable specification of a custom or "pinned" Pester module rather than accepting the latest on the PSModulePath
Fixes #108
Closes #95
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants