From f6d962935602784100054ed7cc58f67bbefeb667 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 23 Jun 2026 05:36:55 +0000
Subject: [PATCH 1/4] Initial plan
From 841c70f14910b3a14b3392c1e07b0d09b107c1ea Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 23 Jun 2026 15:55:59 +0000
Subject: [PATCH 2/4] Update test module checks
---
tests/GitDsc/GitDsc.tests.ps1 | 3 ++-
tests/Microsoft.DotNet.Dsc/Microsoft.DotNet.Dsc.Tests.ps1 | 5 ++++-
tests/Microsoft.VSCode.Dsc/Microsoft.VSCode.Dsc.Tests.ps1 | 3 ++-
.../Microsoft.Windows.Developer.Tests.ps1 | 5 ++++-
tests/testResults.xml | 8 ++++++++
5 files changed, 20 insertions(+), 4 deletions(-)
create mode 100644 tests/testResults.xml
diff --git a/tests/GitDsc/GitDsc.tests.ps1 b/tests/GitDsc/GitDsc.tests.ps1
index 25d4ecdb..244eff9e 100644
--- a/tests/GitDsc/GitDsc.tests.ps1
+++ b/tests/GitDsc/GitDsc.tests.ps1
@@ -9,7 +9,8 @@ Set-StrictMode -Version Latest
#>
BeforeAll {
- if ((Get-Module -Name PSDesiredStateConfiguration -ListAvailable).Version -ne '2.0.7') {
+ $psDesiredStateConfigurationModule = Get-Module -Name PSDesiredStateConfiguration -ListAvailable
+ if (($null -eq $psDesiredStateConfigurationModule) -or ($psDesiredStateConfigurationModule.Version -notcontains '2.0.7')) {
Write-Verbose -Message 'Installing PSDesiredStateConfiguration module.' -Verbose
Install-Module -Name PSDesiredStateConfiguration -Force -SkipPublisherCheck -RequiredVersion '2.0.7'
}
diff --git a/tests/Microsoft.DotNet.Dsc/Microsoft.DotNet.Dsc.Tests.ps1 b/tests/Microsoft.DotNet.Dsc/Microsoft.DotNet.Dsc.Tests.ps1
index 4b60c6c8..ddbb117a 100644
--- a/tests/Microsoft.DotNet.Dsc/Microsoft.DotNet.Dsc.Tests.ps1
+++ b/tests/Microsoft.DotNet.Dsc/Microsoft.DotNet.Dsc.Tests.ps1
@@ -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'
diff --git a/tests/Microsoft.VSCode.Dsc/Microsoft.VSCode.Dsc.Tests.ps1 b/tests/Microsoft.VSCode.Dsc/Microsoft.VSCode.Dsc.Tests.ps1
index de603e24..2e91ba2f 100644
--- a/tests/Microsoft.VSCode.Dsc/Microsoft.VSCode.Dsc.Tests.ps1
+++ b/tests/Microsoft.VSCode.Dsc/Microsoft.VSCode.Dsc.Tests.ps1
@@ -11,7 +11,8 @@ Set-StrictMode -Version Latest
#>
BeforeAll {
- if ((Get-Module -Name PSDesiredStateConfiguration -ListAvailable).Version -ne '2.0.7') {
+ $psDesiredStateConfigurationModule = Get-Module -Name PSDesiredStateConfiguration -ListAvailable
+ if (($null -eq $psDesiredStateConfigurationModule) -or ($psDesiredStateConfigurationModule.Version -notcontains '2.0.7')) {
Write-Verbose -Message 'Installing PSDesiredStateConfiguration module.' -Verbose
Install-Module -Name PSDesiredStateConfiguration -Force -SkipPublisherCheck -RequiredVersion '2.0.7'
}
diff --git a/tests/Microsoft.Windows.Developer/Microsoft.Windows.Developer.Tests.ps1 b/tests/Microsoft.Windows.Developer/Microsoft.Windows.Developer.Tests.ps1
index 68dd4383..6226000f 100644
--- a/tests/Microsoft.Windows.Developer/Microsoft.Windows.Developer.Tests.ps1
+++ b/tests/Microsoft.Windows.Developer/Microsoft.Windows.Developer.Tests.ps1
@@ -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.
diff --git a/tests/testResults.xml b/tests/testResults.xml
new file mode 100644
index 00000000..38e74606
--- /dev/null
+++ b/tests/testResults.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
From a6ac71b5815d3a62644765e568da6936e983d31c Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 23 Jun 2026 15:57:06 +0000
Subject: [PATCH 3/4] Fix test version guard logic
---
tests/GitDsc/GitDsc.tests.ps1 | 3 +-
.../Microsoft.VSCode.Dsc.Tests.ps1 | 3 +-
tests/testResults.xml | 1075 ++++++++++++++++-
3 files changed, 1075 insertions(+), 6 deletions(-)
diff --git a/tests/GitDsc/GitDsc.tests.ps1 b/tests/GitDsc/GitDsc.tests.ps1
index 244eff9e..0cfcabf2 100644
--- a/tests/GitDsc/GitDsc.tests.ps1
+++ b/tests/GitDsc/GitDsc.tests.ps1
@@ -10,7 +10,8 @@ Set-StrictMode -Version Latest
BeforeAll {
$psDesiredStateConfigurationModule = Get-Module -Name PSDesiredStateConfiguration -ListAvailable
- if (($null -eq $psDesiredStateConfigurationModule) -or ($psDesiredStateConfigurationModule.Version -notcontains '2.0.7')) {
+ if (($null -eq $psDesiredStateConfigurationModule) -or
+ ($null -eq ($psDesiredStateConfigurationModule | Where-Object Version -eq '2.0.7'))) {
Write-Verbose -Message 'Installing PSDesiredStateConfiguration module.' -Verbose
Install-Module -Name PSDesiredStateConfiguration -Force -SkipPublisherCheck -RequiredVersion '2.0.7'
}
diff --git a/tests/Microsoft.VSCode.Dsc/Microsoft.VSCode.Dsc.Tests.ps1 b/tests/Microsoft.VSCode.Dsc/Microsoft.VSCode.Dsc.Tests.ps1
index 2e91ba2f..0c4afa26 100644
--- a/tests/Microsoft.VSCode.Dsc/Microsoft.VSCode.Dsc.Tests.ps1
+++ b/tests/Microsoft.VSCode.Dsc/Microsoft.VSCode.Dsc.Tests.ps1
@@ -12,7 +12,8 @@ Set-StrictMode -Version Latest
BeforeAll {
$psDesiredStateConfigurationModule = Get-Module -Name PSDesiredStateConfiguration -ListAvailable
- if (($null -eq $psDesiredStateConfigurationModule) -or ($psDesiredStateConfigurationModule.Version -notcontains '2.0.7')) {
+ if (($null -eq $psDesiredStateConfigurationModule) -or
+ ($null -eq ($psDesiredStateConfigurationModule | Where-Object Version -eq '2.0.7'))) {
Write-Verbose -Message 'Installing PSDesiredStateConfiguration module.' -Verbose
Install-Module -Name PSDesiredStateConfiguration -Force -SkipPublisherCheck -RequiredVersion '2.0.7'
}
diff --git a/tests/testResults.xml b/tests/testResults.xml
index 38e74606..356983ef 100644
--- a/tests/testResults.xml
+++ b/tests/testResults.xml
@@ -1,8 +1,1075 @@
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+ CommandNotFoundException: The term 'Get-DscResource' is not recognized as a name of a cmdlet, function, script file, or executable program.
+Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
+ at <ScriptBlock>, /home/runner/work/winget-dsc/winget-dsc/tests/GitDsc/GitDsc.tests.ps1:24
+
+
+
+
+
+
+
+
+ CommandNotFoundException: The term 'Invoke-DscResource' is not recognized as a name of a cmdlet, function, script file, or executable program.
+Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
+ at <ScriptBlock>, /home/runner/work/winget-dsc/winget-dsc/tests/GitDsc/GitDsc.tests.ps1:37
+
+
+
+
+ CommandNotFoundException: The term 'Invoke-DscResource' is not recognized as a name of a cmdlet, function, script file, or executable program.
+Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
+ at <ScriptBlock>, /home/runner/work/winget-dsc/winget-dsc/tests/GitDsc/GitDsc.tests.ps1:52
+
+
+
+
+ CommandNotFoundException: The term 'Invoke-DscResource' is not recognized as a name of a cmdlet, function, script file, or executable program.
+Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
+ at <ScriptBlock>, /home/runner/work/winget-dsc/winget-dsc/tests/GitDsc/GitDsc.tests.ps1:68
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+ This test should run but it did not. Most likely a setup in some parent block failed.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CommandNotFoundException: The term 'Get-DscResource' is not recognized as a name of a cmdlet, function, script file, or executable program.
+Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
+ at <ScriptBlock>, /home/runner/work/winget-dsc/winget-dsc/tests/Microsoft.VSCode.Dsc/Microsoft.VSCode.Dsc.Tests.ps1:35
+
+
+
+
+
+
+
+
+
+
+ SocketException: Resource temporarily unavailable
+HttpRequestException: Resource temporarily unavailable (marketplace.visualstudio.com:443)
+ at <ScriptBlock>, /home/runner/work/winget-dsc/winget-dsc/tests/Microsoft.VSCode.Dsc/Microsoft.VSCode.Dsc.Tests.ps1:79
+
+
+
+
+ CommandNotFoundException: The term 'Invoke-DscResource' is not recognized as a name of a cmdlet, function, script file, or executable program.
+Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
+ at <ScriptBlock>, /home/runner/work/winget-dsc/winget-dsc/tests/Microsoft.VSCode.Dsc/Microsoft.VSCode.Dsc.Tests.ps1:100
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
From dc81056ea14b57f139834008791551a261c7f02e Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 23 Jun 2026 15:58:05 +0000
Subject: [PATCH 4/4] Simplify test version checks
---
tests/GitDsc/GitDsc.tests.ps1 | 4 +---
tests/Microsoft.VSCode.Dsc/Microsoft.VSCode.Dsc.Tests.ps1 | 4 +---
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/tests/GitDsc/GitDsc.tests.ps1 b/tests/GitDsc/GitDsc.tests.ps1
index 0cfcabf2..47ac335c 100644
--- a/tests/GitDsc/GitDsc.tests.ps1
+++ b/tests/GitDsc/GitDsc.tests.ps1
@@ -9,9 +9,7 @@ Set-StrictMode -Version Latest
#>
BeforeAll {
- $psDesiredStateConfigurationModule = Get-Module -Name PSDesiredStateConfiguration -ListAvailable
- if (($null -eq $psDesiredStateConfigurationModule) -or
- ($null -eq ($psDesiredStateConfigurationModule | Where-Object Version -eq '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'
}
diff --git a/tests/Microsoft.VSCode.Dsc/Microsoft.VSCode.Dsc.Tests.ps1 b/tests/Microsoft.VSCode.Dsc/Microsoft.VSCode.Dsc.Tests.ps1
index 0c4afa26..75ffbbdd 100644
--- a/tests/Microsoft.VSCode.Dsc/Microsoft.VSCode.Dsc.Tests.ps1
+++ b/tests/Microsoft.VSCode.Dsc/Microsoft.VSCode.Dsc.Tests.ps1
@@ -11,9 +11,7 @@ Set-StrictMode -Version Latest
#>
BeforeAll {
- $psDesiredStateConfigurationModule = Get-Module -Name PSDesiredStateConfiguration -ListAvailable
- if (($null -eq $psDesiredStateConfigurationModule) -or
- ($null -eq ($psDesiredStateConfigurationModule | Where-Object Version -eq '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'
}