Skip to content

Commit b038dc1

Browse files
fix: use Get-Module after import to get single module reference
1 parent cb811a7 commit b038dc1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/tests/Module/PSModule/PSModule.Tests.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ Describe 'PSModule - Module tests' {
6464

6565
Context 'Framework - IsWindows compatibility shim' {
6666
BeforeAll {
67-
$script:moduleRef = Import-Module -Name $moduleManifestPath -Force -PassThru
67+
Import-Module -Name $moduleManifestPath -Force
68+
$script:moduleRef = Get-Module -Name $moduleName
6869
}
6970
It 'Should have $IsWindows defined in the module scope' {
7071
# The framework injects "$IsWindows = $true" for PowerShell 5.1 (Desktop edition).

0 commit comments

Comments
 (0)