Skip to content

Commit 496b963

Browse files
🩹 [Patch]: Add CodeCoverage configuration and streamline debug/verbose handling in test scripts for improved clarity
1 parent 93dd7d5 commit 496b963

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

‎scripts/tests/Module/Module.Configuration.ps1‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
TestResult = @{
33
Enabled = $true
44
}
5+
CodeCoverage = @{
6+
Enabled = $true
7+
}
58
Output = @{
69
Verbosity = 'Detailed'
710
}
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
@{
22
Path = Get-ChildItem -Path $PSScriptRoot -Filter *.Tests.ps1 | Select-Object -ExpandProperty FullName
33
Data = @{
4-
Path = $env:PSMODULE_INVOKE_PESTER_INPUT_Run_Path
5-
Debug = $false
6-
Verbose = $false
4+
Path = $env:PSMODULE_INVOKE_PESTER_INPUT_Run_Path
75
}
86
}

‎scripts/tests/Module/PSModule/PSModule.Tests.ps1‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,11 @@ Describe 'PSModule - Module tests' {
1919
It 'The module should be importable' {
2020
{
2121
LogGroup 'Importing Module' {
22-
#Get current debug preference and verbose preference
2322
$currentDebugPreference = $DebugPreference
2423
$currentVerbosePreference = $VerbosePreference
2524
$DebugPreference = 'Continue'
2625
$VerbosePreference = 'Continue'
2726
Import-Module -Name $moduleName -Force -Verbose -Debug
28-
#Set debug preference back to original value
2927
$DebugPreference = $currentDebugPreference
3028
$VerbosePreference = $currentVerbosePreference
3129
}

0 commit comments

Comments
 (0)