Skip to content

Commit ec49684

Browse files
🩹 [Patch]: Consolidate debug and verbose handling in PSModule.Container.ps1 and streamline module import in PSModule.Tests.ps1
1 parent 4594f8d commit ec49684

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
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
4+
Path = $env:PSMODULE_INVOKE_PESTER_INPUT_Run_Path
5+
Debug = $true
6+
Verbose = $true
57
}
68
}

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,7 @@ Describe 'PSModule - Module tests' {
1919
It 'The module should be importable' {
2020
{
2121
LogGroup 'Importing Module' {
22-
$currentDebugPreference = $DebugPreference
23-
$currentVerbosePreference = $VerbosePreference
24-
$DebugPreference = 'Continue'
25-
$VerbosePreference = 'Continue'
2622
Import-Module -Name $moduleName -Force -Verbose -Debug
27-
$DebugPreference = $currentDebugPreference
28-
$VerbosePreference = $currentVerbosePreference
2923
}
3024
} | Should -Not -Throw
3125
}

0 commit comments

Comments
 (0)