Simplify running code coverage for a single test file
- Dominant language
- PowerShell
- Stars
- 243
- Forks
- 46
- Avg merge
- 1h 41m
- Merged PRs (30d)
- 1
Description
### 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 a `New-PesterConfiguration` filled with the code script path and coverage path and settings. This can be complicated for new contributors.
### Verbose logs
```text
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:
```powershell
.\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
```text
n/a
```
### PowerShell version and build the target node is running
```text
n/a
```
### Module version used
```text
n/a
```
Contributor guide
Assessment
This issue has not been assessed yet.