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(
53
53
[switch ] $MinimumVersion5 ,
54
54
55
55
[Parameter (Mandatory )]
56
- [string ] $Output
56
+ [string ] $Output ,
57
+
58
+ [Parameter ()]
59
+ [string ] $OutputPath
57
60
)
58
61
59
62
$pesterModule = Microsoft.PowerShell.Core\Get-Module Pester
@@ -103,6 +106,14 @@ if ($All) {
103
106
if (" FromPreference" -ne $Output ) {
104
107
$configuration.Add (' Output' , @ { Verbosity = $Output })
105
108
}
109
+
110
+ if ($OutputPath ) {
111
+ $configuration.Add (' TestResult' , @ {
112
+ Enabled = $true
113
+ OutputFormat = " NUnit2.5"
114
+ OutputPath = $OutputPath
115
+ })
116
+ }
106
117
Pester\Invoke-Pester - Configuration $configuration | Out-Null
107
118
}
108
119
elseif ($pesterModule.Version -ge ' 3.4.5' ) {
@@ -132,6 +143,15 @@ elseif (($LineNumber -match '\d+') -and ($pesterModule.Version -ge '4.6.0')) {
132
143
if (" FromPreference" -ne $Output ) {
133
144
$configuration.Add (' Output' , @ { Verbosity = $Output })
134
145
}
146
+
147
+ if ($OutputPath ) {
148
+ $configuration.Add (' TestResult' , @ {
149
+ Enabled = $true
150
+ OutputFormat = " NUnit2.5"
151
+ OutputPath = $OutputPath
152
+ })
153
+ }
154
+
135
155
Pester\Invoke-Pester - Configuration $configuration | Out-Null
136
156
}
137
157
else {
You can’t perform that action at this time.
0 commit comments