You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently when running ./build.ps1 -Task test -PesterPath ‘testfile’ it runs code coverage on all files in the built module result in a lot out missed lines (especially for big modules).
To be able to run code coverage for a single file using Invoke-Pester you have to pass a New-PesterConfiguration filled with the code script path and coverage path and settings. This can be complicated for new contributors.
Verbose logs
m/a
How to reproduce
n/a
Expected behavior
n/a
Current behavior
n/a
Suggested solution
We should simplify that by adding a CodeCovergePath to build.ps1 so it possible to write:
.\build.ps1 -Task test -PesterPath ‘testfile’-CodeCoveragePath ‘code_script_file’
It will then also use settings from the build configuration.
Operating system the target node is running
n/a
PowerShell version and build the target node is running
n/a
Module version used
n/a
The text was updated successfully, but these errors were encountered:
For this to work we need to get coverage for a specific source file in the built module (e.g. MOF-based DSC resource) using CodeCoveragePath, or a particular function inside the built module script file (.psm1) for modules using pattern Public/Private/Classes, using the same build.ps1 parameter CodeCoveragePath but pass an [System.Collections.IDictionary] like Pester expects. For the latter we need a way to single out the lines of an individual function or functions.
But it is not possible to pass an [System.Collections.IDictionary] to Pester due to issue pester/Pester#2190.
Problem description
Currently when running
./build.ps1 -Task test -PesterPath ‘testfile’
it runs code coverage on all files in the built module result in a lot out missed lines (especially for big modules).To be able to run code coverage for a single file using
Invoke-Pester
you have to pass aNew-PesterConfiguration
filled with the code script path and coverage path and settings. This can be complicated for new contributors.Verbose logs
How to reproduce
n/a
Expected behavior
n/a
Current behavior
n/a
Suggested solution
We should simplify that by adding a
CodeCovergePath
tobuild.ps1
so it possible to write:It will then also use settings from the build configuration.
Operating system the target node is running
PowerShell version and build the target node is running
Module version used
The text was updated successfully, but these errors were encountered: