diff --git a/src/System.Management.Automation/engine/Modules/ImportProvider.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Core/ImportProvider.Tests.ps1 similarity index 93% rename from src/System.Management.Automation/engine/Modules/ImportProvider.Tests.ps1 rename to test/powershell/Modules/Microsoft.PowerShell.Core/ImportProvider.Tests.ps1 index 1bfcb84d0ce..dba35c4ec59 100644 --- a/src/System.Management.Automation/engine/Modules/ImportProvider.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Core/ImportProvider.Tests.ps1 @@ -62,7 +62,7 @@ namespace module { } It "Import a PowerShell provider with correct name" { - $result = & $pwsh -NoProfile -Command "Import-Module -Name $testModulePath; Get-Item ReproModule\SamplePrv::test.txt" - $result.PSPath | Should -BeExactly "ReproModule\SamplePrv::test.txt" + $result = & $pwsh -NoProfile -Command "Import-Module -Name $testModulePath; (Get-Item ReproModule\SamplePrv::test.txt).PSPath" + $result | Should -BeExactly "ReproModule\SamplePrv::test.txt" } }