From 89fc74475d9620a9ca41f5149f4de3fa5fdb0644 Mon Sep 17 00:00:00 2001 From: "Vic Perdana (MSFT)" <7114832+vicperdana@users.noreply.github.com> Date: Wed, 21 Aug 2024 23:41:50 +1000 Subject: [PATCH] Refactor PSDocs.Common.Tests.ps1 to remove unnecessary module removal and use TestModule instead of PSDocs module in InModuleScope --- tests/PSDocs.Tests/PSDocs.Common.Tests.ps1 | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/PSDocs.Tests/PSDocs.Common.Tests.ps1 b/tests/PSDocs.Tests/PSDocs.Common.Tests.ps1 index d5c7045..9ef69f4 100644 --- a/tests/PSDocs.Tests/PSDocs.Common.Tests.ps1 +++ b/tests/PSDocs.Tests/PSDocs.Common.Tests.ps1 @@ -235,7 +235,6 @@ Describe 'Get-PSDocument' -Tag 'Cmdlet', 'Common', 'Get-PSDocument' { $testModuleSourcePath = Join-Path $here -ChildPath 'TestModule'; Mock -ModuleName 'PSDocs' LoadModule; Import-Module $testModuleSourcePath -Force; - $rootPath = $PWD; if ($Null -ne (Get-Module -Name TestModule -ErrorAction SilentlyContinue)) { $Null = Remove-Module -Name TestModule; }