From 14b0a4fdb9ab29d55fee2e80d4fc5ec4a8e9c62e Mon Sep 17 00:00:00 2001 From: Mikhail Batishchev Date: Sat, 11 Feb 2023 17:11:05 +0300 Subject: [PATCH 1/2] fix: old property in test task was removed Property WriteVSCodeMarker was removed in Pester. --- .vscode/tasks.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index af9c9646f..f91168461 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -33,7 +33,7 @@ { "label": "Test", "type": "shell", - "command": "Import-Module Pester -MinimumVersion 5.0.0; $c = [PesterConfiguration]::Default; $c.Run.Path = 'test'; $c.Output.Verbosity = 'Detailed'; $c.Debug.WriteVSCodeMarker = $true; Invoke-Pester -Configuration $c", + "command": "Import-Module Pester -MinimumVersion 5.0.0; $c = [PesterConfiguration]::Default; $c.Run.Path = 'test'; $c.Output.Verbosity = 'Detailed'; Invoke-Pester -Configuration $c", "group": { "kind": "test", "isDefault": true From b52a1f59ae2a0bea1287b8837f9ad9bfcf46501a Mon Sep 17 00:00:00 2001 From: Mikhail Batishchev Date: Sat, 11 Feb 2023 17:19:08 +0300 Subject: [PATCH 2/2] feature: task for run tests only in current file --- .vscode/tasks.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index f91168461..78c26fa5b 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -41,6 +41,18 @@ "problemMatcher": [ "$pester" ] + }, + { + "label": "TestCurrentFile", + "type": "shell", + "command": "Clear-Host; Import-Module Pester -MinimumVersion 5.0.0; $c = [PesterConfiguration]::Default; $c.Run.Path = '${file}'; $c.Output.Verbosity = 'Detailed'; Invoke-Pester -Configuration $c", + "group": { + "kind": "test", + "isDefault": false + }, + "problemMatcher": [ + "$pester" + ] } ] }