-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
Before submitting a bug report, please ensure you :
- Verified this bug is not already reported in an issue
- Can reproduce in a clean PowerShell session (clean =
powershell -NoProfile)
Describe the Problem
Throws warnings and quite likely does not work properly with Pester v5.0
Pester v5.0 changed from command line switches, hashtables, etc. to a single Configuration nested hashtable object.
Steps To Reproduce
- Import-Module Pester -RequiredVersion 5.0.4
- Run Invoke-PSCodeHealth -Path .\src -TestsPath .\tests
- Error or unexpected behavior :
WARNING: You are using Legacy parameter set that adapts Pester 5 syntax to Pester 4 syntax. This parameter set is
deprecated, and does not work 100%. The -Strict and -PesterOption parameters are ignored, and providing advanced
configuration to -Path (-Script), and -CodeCoverage via a hash table does not work. Please refer to
https://github.com/pester/Pester/releases/tag/5.0.1#legacy-parameter-set for more information.
Resolve-CoverageInfo : Could not resolve coverage path 'System.Collections.Hashtable': Cannot find path
'...\System.Collections.Hashtable' because it does not exist.
At C:\Program Files\WindowsPowerShell\Modules\pester\5.0.4\Pester.psm1:7149 char:5
+ Resolve-CoverageInfo -UnresolvedCoverageInfo $unresolvedCoverageI ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Resolve-CoverageInfo
Expected behavior
PSCodeHealth should detect the Pester version and invoke the command properly.
Environment
- Operating system : Windows10
- PowerShell version : 5.1.18362.1110
- PSCodeHealth version : 0.2.26
- Pester: 5.0.4
Additional context
How has this issue affected you ? Prevents us from migrating to new version of Pester.
What are you trying to accomplish ? Basic functionality advertised by the package.
Providing context helps us come up with a solution that is most useful and prioritize issues.
wethreetrees and Viajaz
Metadata
Metadata
Assignees
Labels
No labels