From 7178df2cfd4659baf03617cb2dda4ad8d9621ebb Mon Sep 17 00:00:00 2001 From: blue Date: Sat, 8 Dec 2018 18:40:56 +0000 Subject: [PATCH] Add Pester build system variant for PowerShell Add a Pester build system variant for PowerShell files which runs Invoke-Pester at the current location. --- Support/Powershell.sublime-build | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Support/Powershell.sublime-build b/Support/Powershell.sublime-build index c902151..5c25ccb 100644 --- a/Support/Powershell.sublime-build +++ b/Support/Powershell.sublime-build @@ -4,5 +4,17 @@ "windows": { "cmd": ["powershell.exe", "-noprofile", "-ExecutionPolicy", "Bypass", "-file", "$file"], - } + }, + + "variants": [ + { + "name": "Pester", + "cmd": ["pwsh", "-NoProfile","-NonInteractive", "-ExecutionPolicy", "Bypass","-Command","Invoke-Pester"], + "file_regex": "at , (.+): line ([0-9]+)$", + + "windows": { + "cmd": ["powershell.exe", "-NoProfile","-NonInteractive", "-ExecutionPolicy", "Bypass","-Command","Invoke-Pester"], + } + } + ] }