Skip to content

ModuleHelp.Tests.ps1 throws false positives #1417

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.

Activity

  1. SydneyhSmith commented on Feb 25, 2020

    @SydneyhSmith
    Collaborator

    Jos Koelewijn (@Jawz84) thanks for opening this issue and linking the PR

  2. added a commit that references this issue on Feb 25, 2020
    46e89de
  3. bergmeister commented on Feb 25, 2020

    @bergmeister
    Collaborator

    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

  4. Jawz84 commented on Feb 25, 2020

    @Jawz84
    ContributorAuthor

    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 👍

  5. bergmeister commented on Feb 25, 2020

    @bergmeister
    Collaborator

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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