Skip to content

Commit

Permalink
Refactor PSDocs.Common.Tests.ps1 to import PSDocs module and use curr…
Browse files Browse the repository at this point in the history
…ent encoding variable in test names
  • Loading branch information
vicperdana committed Aug 21, 2024
1 parent 581229f commit 9797439
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/PSDocs.Tests/PSDocs.Common.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ Describe 'Get-PSDocument' -Tag 'Cmdlet', 'Common', 'Get-PSDocument' {
$testModuleSourcePath = Join-Path $here -ChildPath 'TestModule';
Mock -CommandName 'LoadModule' -ModuleName 'PSDocs' -Verifiable;
Import-Module $testModuleSourcePath -Force;
Import-Module PSDocs -Force;
$result = @(Get-PSDocument -Module 'TestModule');
$currentLoadingPreference = Get-Variable -Name PSModuleAutoLoadingPreference -ErrorAction SilentlyContinue -ValueOnly
}
Expand All @@ -250,7 +251,6 @@ Describe 'Get-PSDocument' -Tag 'Cmdlet', 'Common', 'Get-PSDocument' {
}

InModuleScope PSDocs {

It 'Loads module with preference' {
try {
# Test negative case
Expand Down

0 comments on commit 9797439

Please sign in to comment.