Psscriptanalyzer: ModuleHelp.Tests.ps1 throws false positives

Created on 17 Feb 2020  路  4Comments  路  Source: PowerShell/PSScriptAnalyzer

There are small problems in the ModuleHelp.Tests.ps1 file when running tests on Pwsh, or running on an environment without PSScriptAnalyzer actually _installed_.

affected areas:

  1. test failure when PSScriptAnalyzer is not installed (only loaded from the .\out\ directory)
  2. test failure on Pwsh due to non-supported 'Workspace' command type

Steps to reproduce

1) on a system without PSScriptAnalyzer module installed
2) when build configuration is set to DEBUG

.\PSScriptAnalyzer\build.ps1
.\PSScriptAnalyzer\build.ps1 -Test

Expected behavior

1) No test failures
2) No test failures

Actual behavior

1) Test fails to properly check module version, because it was not installed, only loaded from .\PSScriptAnalyzer\out\
2) Test fails with an error that the 'AttachAndDebug' parameter for Invoke-ScriptAnalyzer and Invoke-Formatter does not have Help.

Area - Build Area - Test

Most helpful comment

No worries, that problem I mentioned on Twitter earlier applied to this much bigger comment actually (where I decide to just copy paste the text into a draft email to be able to copy paste from my mobile...) 馃槄 Commenting works now again from Desktop :-) I've seen some of the updates in your other PR and want to take some time this week to fully review it but from a glance it looks already good

All 4 comments

@Jawz84 thanks for opening this issue and linking the PR

Yes, thanks, I've merged it in now. I've changed the labels though from bug to build as this is not a bug in the actual product but rather the internal build/test system

Thanks for taking the time to write that, I understand you had to try a few times and do it from mobile because it wouldn't work from desktop :+1:

No worries, that problem I mentioned on Twitter earlier applied to this much bigger comment actually (where I decide to just copy paste the text into a draft email to be able to copy paste from my mobile...) 馃槄 Commenting works now again from Desktop :-) I've seen some of the updates in your other PR and want to take some time this week to fully review it but from a glance it looks already good

Was this page helpful?
0 / 5 - 0 ratings