Skip to content

ModuleHelp.Tests.ps1 throws false positives #1417

Closed
@Jawz84

Description

@Jawz84

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions