Skip to content

Script scope variables not defined for tests #2028

@rjmholt

Description

@rjmholt

General summary of the issue

PSScriptAnalyzer migrated to Pester 5 about a year ago, but recently we've seen some new test failures in CI.

I wasn't able to reproduce the issue in my local clone, and my suspicion is that my local Pester version (5.1-rc1) doesn't have the issue.

In CI we seem to be using 5.0.2.

I'm working on the fix in PowerShell/PSScriptAnalyzer#1697.

Essentially:

It looks like we're using Pester 5.0.2 in PS 4 and I'm wondering what the right solution is here and why it might be behaving differently across different platforms.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions