File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed
module/PowerShellEditorServices Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,10 @@ param(
5353 [switch ] $MinimumVersion5 ,
5454
5555 [Parameter (Mandatory )]
56- [string ] $Output
56+ [string ] $Output ,
57+
58+ [Parameter ()]
59+ [string ] $OutputPath
5760)
5861
5962$pesterModule = Microsoft.PowerShell.Core\Get-Module Pester
@@ -103,6 +106,14 @@ if ($All) {
103106 if (" FromPreference" -ne $Output ) {
104107 $configuration.Add (' Output' , @ { Verbosity = $Output })
105108 }
109+
110+ if ($OutputPath ) {
111+ $configuration.Add (' TestResult' , @ {
112+ Enabled = $true
113+ OutputFormat = " NUnit2.5"
114+ OutputPath = $OutputPath
115+ })
116+ }
106117 Pester\Invoke-Pester - Configuration $configuration | Out-Null
107118 }
108119 elseif ($pesterModule.Version -ge ' 3.4.5' ) {
@@ -132,6 +143,15 @@ elseif (($LineNumber -match '\d+') -and ($pesterModule.Version -ge '4.6.0')) {
132143 if (" FromPreference" -ne $Output ) {
133144 $configuration.Add (' Output' , @ { Verbosity = $Output })
134145 }
146+
147+ if ($OutputPath ) {
148+ $configuration.Add (' TestResult' , @ {
149+ Enabled = $true
150+ OutputFormat = " NUnit2.5"
151+ OutputPath = $OutputPath
152+ })
153+ }
154+
135155 Pester\Invoke-Pester - Configuration $configuration | Out-Null
136156 }
137157 else {
You can’t perform that action at this time.
0 commit comments