From cd19d862c74a83afd0f8e53207fe4281c4a87e48 Mon Sep 17 00:00:00 2001 From: Damien Solodow Date: Thu, 27 Jun 2024 22:12:55 -0400 Subject: [PATCH] set Test task as default test task --- .../Resources/Editor/VSCode/tasks.json | 32 ++++++++++++------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/src/Catesta/Resources/Editor/VSCode/tasks.json b/src/Catesta/Resources/Editor/VSCode/tasks.json index f5aa4c0..ecef4be 100644 --- a/src/Catesta/Resources/Editor/VSCode/tasks.json +++ b/src/Catesta/Resources/Editor/VSCode/tasks.json @@ -158,7 +158,10 @@ "echo": false, "showReuseMessage": false }, - "group": "test" + "group": { + "kind": "test", + "isDefault": true + } }, { "label": "DevCC", @@ -212,11 +215,12 @@ if ($PLASTER_PARAM_Pester-eq '4') { @' "command": "Import-Module -Name Pester -MaximumVersion 4.99.99;Invoke-Pester '${workspaceFolder}/src/Tests/Unit' -PesterOption @{IncludeVSCodeMarker=$true}", '@ -} + } elseif ($PLASTER_PARAM_Pester-eq '5') { @' "command": "Invoke-Pester '${workspaceFolder}/src/Tests/Unit' -Output Detailed", -'@ } +'@ + } %> "problemMatcher": "$pester", "group": "test" @@ -229,10 +233,11 @@ if ($PLASTER_PARAM_Pester-eq '4') { @' "command": "Import-Module -Name Pester -MaximumVersion 4.99.99;Import-Module -Name '${workspaceFolder}/src/${workspaceFolderBasename}/${workspaceFolderBasename}.psm1';Invoke-Pester '${workspaceFolder}/src/Tests/Unit/*/${input:functionName}.Tests.ps1' -CodeCoverage '${workspaceFolder}/src/${workspaceFolderBasename}/*/${input:functionName}.ps1'", '@ -} + } elseif ($PLASTER_PARAM_Pester-eq '5') { @' "command": "Import-Module -Name '${workspaceFolder}/src/${workspaceFolderBasename}/${workspaceFolderBasename}.psm1';$pesterConfig = New-PesterConfiguration;$pesterConfig.run.Path = '${workspaceFolder}/src/Tests/Unit/*/${input:functionName}.Tests.ps1';$pesterConfig.CodeCoverage.Enabled = $true;$pesterConfig.CodeCoverage.Path = '${workspaceFolder}/src/${workspaceFolderBasename}/*/${input:functionName}.ps1';Invoke-Pester -Configuration $pesterConfig", -'@ } +'@ + } %> "problemMatcher": "$pester", "presentation": { @@ -249,10 +254,11 @@ if ($PLASTER_PARAM_Pester-eq '4') { @' "command": "Import-Module -Name Pester -MaximumVersion 4.99.99;Import-Module -Name '${workspaceFolder}/src/${workspaceFolderBasename}/${workspaceFolderBasename}.psm1';Invoke-Pester '${workspaceFolder}/src/Tests/Unit/*/${input:functionName}.Tests.ps1'", '@ -} + } elseif ($PLASTER_PARAM_Pester-eq '5') { @' "command": "Import-Module -Name '${workspaceFolder}/src/${workspaceFolderBasename}/${workspaceFolderBasename}.psm1';Invoke-Pester '${workspaceFolder}/src/Tests/Unit/*/${input:functionName}.Tests.ps1' -Output Detailed", -'@ } +'@ + } %> "problemMatcher": "$pester", "presentation": { @@ -269,11 +275,12 @@ if ($PLASTER_PARAM_Pester-eq '4') { @' "command": "Import-Module -Name '${workspaceFolder}/src/${workspaceFolderBasename}/${workspaceFolderBasename}.psm1';Import-Module -Name Pester -MaximumVersion 4.99.99;Invoke-Pester '${workspaceFolder}/src/Tests/Unit/*/${input:functionName}.Tests.ps1' -CodeCoverage '${workspaceFolder}/src/${workspaceFolderBasename}/*/${input:functionName}.ps1' -CodeCoverageOutputFile '${workspaceFolder}/cov.xml'", '@ -} + } elseif ($PLASTER_PARAM_Pester-eq '5') { @' "command": "Import-Module -Name '${workspaceFolder}/src/${workspaceFolderBasename}/${workspaceFolderBasename}.psm1';$pesterConfig = New-PesterConfiguration;$pesterConfig.run.Path = '${workspaceFolder}/src/Tests/Unit/*/${input:functionName}.Tests.ps1';$pesterConfig.CodeCoverage.Enabled = $true;$pesterConfig.CodeCoverage.Path = '${workspaceFolder}/src/${workspaceFolderBasename}/*/${input:functionName}.ps1';$pesterConfig.CodeCoverage.OutputPath = '${workspaceFolder}/cov.xml';$pesterConfig.CodeCoverage.OutputFormat = 'CoverageGutters';Invoke-Pester -Configuration $pesterConfig", -'@ } +'@ + } %> "problemMatcher": "$pester", "presentation": { @@ -290,10 +297,11 @@ if ($PLASTER_PARAM_Pester-eq '4') { @' "command": "Import-Module -Name Pester -MaximumVersion 4.99.99;Import-Module -Name '${workspaceFolder}/src/${workspaceFolderBasename}/${workspaceFolderBasename}.psm1';Invoke-Pester '${workspaceFolder}/src/Tests/Integration/*/${input:functionName}.Tests.ps1'", '@ -} + } elseif ($PLASTER_PARAM_Pester-eq '5') { @' "command": "Import-Module -Name '${workspaceFolder}/src/${workspaceFolderBasename}/${workspaceFolderBasename}.psm1';Invoke-Pester '${workspaceFolder}/src/Tests/Integration/*/${input:functionName}.Tests.ps1' -Output Detailed", -'@ } +'@ + } %> "problemMatcher": "$pester", "presentation": { @@ -310,4 +318,4 @@ elseif ($PLASTER_PARAM_Pester-eq '5') { @' "description": "Name of PowerShell function you want to test" } ] -} +} \ No newline at end of file