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

[115] tests keep running and running tests number increases #130

Conversation

antoinemartin
Copy link
Contributor

The actual fix is the first commit. It can be cherry-picked if the rest of the PR is not considered useful.

I added a command to stop the background process. This is useful when testing a module with InModuleScope that needs to be re-imported while keeping the process to quicly run tests on save.

The rest are minor adjustments.

Thank you for this great extension.

Fixes #115

The test run was only ended when it was cancelled.
npm protests about a security issue.
When packaging the extension, a warning complains about the version of
vsce.
When testing a module, with or without classes, it may be necessary to
restart the background process. There is the
`pester.runTestsInNewProcess`  setting for that, but one may not want to
restart the process for each test run. This commit introduces a new
command.
Tests were failing for two reasons:

- when `pwsh` is not installed (Vanilla PowerShell 5 on Windows)
- when testing the `PowerShell.exec()` method. AFAIK, this occurs when the execution
  of the PowerShell is too fast

For the first one, I have introduced a constant taking the platform into
account.

For the second one, when check the that the stream is still alive before
waiting for it.
@JustinGrote
Copy link
Collaborator

I'm amazed you were able to untangle my maze of code, great work!

Here's the built VSIX of your PR, if you can verify it fixes it then I'll merge, I'll confirm in the main branch as well.
https://github.com/pester/vscode-adapter/suites/10017671926/artifacts/488197337

@antoinemartin
Copy link
Contributor Author

It works for me. Let's see if other people reports the same.

@johlju
Copy link
Contributor

johlju commented Jan 1, 2023

@antoinemartin thank you for this! 🙇 After running this proposed change for a few days now it made the extension fun to use again. It feels more stable, before it could just suddenly stop working so before this I haven't used the extension for months. Awesome work 🙂

@JustinGrote
Copy link
Collaborator

@johlju thanks for the confirmation! I'll merge and release.

@JustinGrote JustinGrote merged commit 1033323 into pester:main Jan 1, 2023
@JustinGrote
Copy link
Collaborator

Published and released! Thanks all for your input.

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.

Tests keep running and running tests number increases
3 participants