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

Add configuration option for custom Pester module path #111

Merged
merged 10 commits into from
Mar 27, 2022

Conversation

johlju
Copy link
Contributor

@johlju johlju commented Mar 22, 2022

@JustinGrote this is my attempt to fix issue #108. Please give pointers if I missed something, I followed how runTestsInNewProcess was done to get an idea where to change stuff. 🙂

  • Add new configuration property pesterModulePath
  • Update CONTRIBUTING.md to help contributors.

Fixes #108
Closes #95

@johlju
Copy link
Contributor Author

johlju commented Mar 22, 2022

I can build the project locally with npm run build v12.0.0 and then I get a .vsix file, but VS Code says it is not compatible with my version of VS Code (1.65.2). Any tips what I do wrong?

src/pesterTestController.ts Outdated Show resolved Hide resolved
@JustinGrote
Copy link
Collaborator

I can build the project locally with npm run build v12.0.0 and then I get a .vsix file, but VS Code says it is not compatible with my version of VS Code (1.65.2). Any tips what I do wrong?

The latest "main" branch requires Insiders, because the next version of VS Code runs NodeJS 16 and has some breaking changes I had to fix.

@johlju
Copy link
Contributor Author

johlju commented Mar 22, 2022

The latest "main" branch requires Insiders, because the next version of VS Code runs NodeJS 16 and has some breaking changes I had to fix.

Now I got that "streams" error you talked about so have to wait to practically test this change when that is resolved.

package.json Show resolved Hide resolved
@JustinGrote
Copy link
Collaborator

The latest "main" branch requires Insiders, because the next version of VS Code runs NodeJS 16 and has some breaking changes I had to fix.

Now I got that "streams" error you talked about so have to wait to practically test this change when that is resolved.

Main shouldn't have any streams errors, it should test fine. There should be a option to "run extension" in the debug window that will start a new vscode instance running the current version of the extension.

@JustinGrote
Copy link
Collaborator

Also all of the aspects you listed in Contributions are covered by the tasks and debug configs
image
image

@johlju
Copy link
Contributor Author

johlju commented Mar 22, 2022

Also all of the aspects you listed in Contributions are covered by the tasks and debug configs

Ah. That is the way you suppose to do it. 🙂 I document that too. I thought I would document stuff that I was looking for, to help others in the future. 🙂

@johlju
Copy link
Contributor Author

johlju commented Mar 23, 2022

@JustinGrote the debug experience was awesome! Pretty neat how seamless it was. It now works perfectly for both single project workspace and a multi-project workspace. Just need to fix the TODO (loop through workspaces) and the documentation, then I feel pretty great about this change. Do you see anything that could be improved in the code (both style and logic)?

@JustinGrote
Copy link
Collaborator

I'll try to find some time to review tonight, thanks for the contribution!

@johlju johlju changed the title Add configuration tests for custom Pester module path Add configuration option for custom Pester module path Mar 24, 2022
@johlju
Copy link
Contributor Author

johlju commented Mar 25, 2022

@JustinGrote I moved doc changes to another PR. Ready for review now.

@johlju johlju marked this pull request as ready for review March 25, 2022 10:27
@johlju
Copy link
Contributor Author

johlju commented Mar 25, 2022

Here is a run with this change. I do not have any Pester module installed in any $env:PSModulePath.

PS> Get-module Pester -ListAvailable
PS>

It uses the relative path .\output\RequiredModules\Pester to find the Pester module.

image

Test run in SqlServerDsc:

Note: Those with the yellow symbol that are left are not yet converted, the scripts have a return-statement at the top to not run Pester 4 tests

PesterTestAdaperRun

package.json Outdated Show resolved Hide resolved
@JustinGrote
Copy link
Collaborator

Thank you so much for your contribution! I'll try to review again sometime this weekend and hopefully we can get this merged.

@JustinGrote
Copy link
Collaborator

FYI a vsix is automatically built on every commit, you can access it here to start using it right away:
https://github.com/pester/vscode-adapter/actions/runs/2039455419#artifacts

Copy link
Collaborator

@JustinGrote JustinGrote left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM After Changes

Scripts/PesterInterface.ps1 Outdated Show resolved Hide resolved
Scripts/PesterInterface.ps1 Show resolved Hide resolved
src/pesterTestController.ts Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
src/pesterTestController.ts Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
src/pesterTestController.ts Show resolved Hide resolved
@JustinGrote JustinGrote merged commit aaf0aa6 into pester:main Mar 27, 2022
@JustinGrote
Copy link
Collaborator

@johlju thanks for your contribution! I'll push a new release after a couple other items I want to get completed.

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.

Configuration setting for Pester path Tests no longer expand or runs in test explorer
2 participants