Skip to content

Commit

Permalink
set Test task as default test task
Browse files Browse the repository at this point in the history
  • Loading branch information
dsolodow committed Jun 28, 2024
1 parent 4919667 commit cd19d86
Showing 1 changed file with 20 additions and 12 deletions.
32 changes: 20 additions & 12 deletions src/Catesta/Resources/Editor/VSCode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,10 @@
"echo": false,
"showReuseMessage": false
},
"group": "test"
"group": {
"kind": "test",
"isDefault": true
}
},
{
"label": "DevCC",
Expand Down Expand Up @@ -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"
Expand All @@ -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": {
Expand All @@ -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": {
Expand All @@ -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": {
Expand All @@ -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": {
Expand All @@ -310,4 +318,4 @@ elseif ($PLASTER_PARAM_Pester-eq '5') { @'
"description": "Name of PowerShell function you want to test"
}
]
}
}

0 comments on commit cd19d86

Please sign in to comment.