Skip to content

Commit c568915

Browse files
🪲 [Fix]: Remove unnecessary LogGroup wrappers in tests (#100)
## Description This pull request simplifies the `PSModule.Tests.ps1` script by removing unnecessary logging groups within the test cases which would autoload GitHub and its dependencies, breaking on tests for its dependencies (Sodium, Uri, CaseStyle, etc.). Simplification of test cases: * Removed `LogGroup` blocks from the `Module Manifest exists` and `Module Manifest is valid` tests. ## Type of change <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] 📖 [Docs] - [x] 🪲 [Fix] - [ ] 🩹 [Patch] - [ ] ⚠️ [Security fix] - [ ] 🚀 [Feature] - [ ] 🌟 [Breaking change] ## Checklist <!-- Use the check-boxes [x] on the options that are relevant. --> - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas
1 parent c207858 commit c568915

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

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

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,14 @@ Describe 'PSModule - Module tests' {
2727

2828
Context 'Module Manifest' {
2929
It 'Module Manifest exists' {
30-
LogGroup 'Module manifest' {
31-
$result = Test-Path -Path $moduleManifestPath
32-
$result | Should -Be $true
33-
Write-Host "$($result | Format-List | Out-String)"
34-
}
30+
$result = Test-Path -Path $moduleManifestPath
31+
$result | Should -Be $true
32+
Write-Host "$($result | Format-List | Out-String)"
3533
}
3634
It 'Module Manifest is valid' {
37-
LogGroup 'Validating Module Manifest' {
38-
$result = Test-ModuleManifest -Path $moduleManifestPath
39-
$result | Should -Not -Be $null
40-
Write-Host "$($result | Format-List | Out-String)"
41-
}
35+
$result = Test-ModuleManifest -Path $moduleManifestPath
36+
$result | Should -Not -Be $null
37+
Write-Host "$($result | Format-List | Out-String)"
4238
}
4339
# It 'has a valid license URL' {}
4440
# It 'has a valid project URL' {}

0 commit comments

Comments
 (0)