pester / vscode-adapter

Run PowerShell Pester Tests with Visual Studio Code
MIT License
57 stars 12 forks source link

Please add in an option to toggle loading on non-Windows profiles #263

Open thisisnotfez opened 3 weeks ago

thisisnotfez commented 3 weeks ago

Firstly, amazing extension. Thank you for it.

Secondly, yes. Title. I have been legitimately spinning my wheels for over a year trying to suppress Powershell loading in my Linux OS until I had that critical AHA moment, just mere minutes ago.

If Pester is enabled, Powershell will load, ignoring all settings defined for it to not load in Linux or OSX envs.

Please add in a toggle, setting, black magic hoodoo, something, to ensure that Pester doesn't forcibly load Powershell in a non-Windows environment. Or by chosen profile, at all.

Thank you.

JustinGrote commented 3 weeks ago

The pester extension requires the PowerShell extension (and the PowerShell Editor Services terminal by extension) to do anything because it has to detect where your pwsh exists to load the same version for the pester runner. That said, if it doesn't find any .tests.ps1 files (or whatever convention you specify for your test files in settings), then it shouldnt start it I don't think. I will test this theory.