-
-
Notifications
You must be signed in to change notification settings - Fork 476
Closed
Description
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:
- Initially the issue was hashtable keys defined with script-scoped variables were null. I fixed this by moving those variables to normal scope under a top-level
BeforeAll
block - This fixed the issue on most platforms, but I'm now seeing test case input as null in PowerShell 4
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
Labels
No labels