Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/GitDsc/GitDsc.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Set-StrictMode -Version Latest
#>

BeforeAll {
if ((Get-Module -Name PSDesiredStateConfiguration -ListAvailable).Version -ne '2.0.7') {
if ($null -eq (Get-Module -Name PSDesiredStateConfiguration -ListAvailable | Where-Object Version -eq '2.0.7')) {
Write-Verbose -Message 'Installing PSDesiredStateConfiguration module.' -Verbose
Install-Module -Name PSDesiredStateConfiguration -Force -SkipPublisherCheck -RequiredVersion '2.0.7'
}
Expand Down
5 changes: 4 additions & 1 deletion tests/Microsoft.DotNet.Dsc/Microsoft.DotNet.Dsc.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ Set-StrictMode -Version Latest
#>

BeforeAll {
Install-Module -Name PSDesiredStateConfiguration -Force -SkipPublisherCheck
if ($null -eq (Get-Module -Name PSDesiredStateConfiguration -ListAvailable)) {
Install-Module -Name PSDesiredStateConfiguration -Force -SkipPublisherCheck
}

Import-Module Microsoft.DotNet.Dsc

$script:toolsDir = Join-Path $env:USERPROFILE 'tools'
Expand Down
2 changes: 1 addition & 1 deletion tests/Microsoft.VSCode.Dsc/Microsoft.VSCode.Dsc.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Set-StrictMode -Version Latest
#>

BeforeAll {
if ((Get-Module -Name PSDesiredStateConfiguration -ListAvailable).Version -ne '2.0.7') {
if ($null -eq (Get-Module -Name PSDesiredStateConfiguration -ListAvailable | Where-Object Version -eq '2.0.7')) {
Write-Verbose -Message 'Installing PSDesiredStateConfiguration module.' -Verbose
Install-Module -Name PSDesiredStateConfiguration -Force -SkipPublisherCheck -RequiredVersion '2.0.7'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ Set-StrictMode -Version Latest
# InModuleScope ensures that all mocks are on the Microsoft.Windows.Developer module.
InModuleScope Microsoft.Windows.Developer {
BeforeAll {
Install-Module -Name PSDesiredStateConfiguration -Force -SkipPublisherCheck
if ($null -eq (Get-Module -Name PSDesiredStateConfiguration -ListAvailable)) {
Install-Module -Name PSDesiredStateConfiguration -Force -SkipPublisherCheck
}

Import-Module Microsoft.Windows.Developer

# Create test registry path.
Expand Down
Loading