@@ -70,11 +70,8 @@ const TestConsoleOutput = ({
70
70
} ;
71
71
72
72
const CompletedTests : React . FC < {
73
- completedTests : Array < {
74
- testResult : TestResult ;
75
- config : Config . ProjectConfig ;
76
- } > ;
77
- width ?: number ;
73
+ completedTests : State [ 'completedTests' ] ;
74
+ width : number ;
78
75
globalConfig : Config . GlobalConfig ;
79
76
} > = ( { completedTests, width, globalConfig } ) => {
80
77
if ( completedTests . length === 0 ) {
@@ -86,7 +83,7 @@ const CompletedTests: React.FC<{
86
83
< Box paddingBottom = { 1 } flexDirection = "column" >
87
84
< Static >
88
85
{ completedTests . map ( ( { testResult, config } ) => (
89
- < React . Fragment key = { testResult . testFilePath } >
86
+ < React . Fragment key = { testResult . testFilePath + config . name } >
90
87
< ResultHeader
91
88
config = { config || globalConfig }
92
89
testResult = { testResult }
@@ -176,6 +173,32 @@ const reporterReducer: React.Reducer<State, DateEvents> = (
176
173
}
177
174
} ;
178
175
176
+ const RunningTests : React . FC < {
177
+ tests : State [ 'currentTests' ] ;
178
+ width : number ;
179
+ } > = ( { tests, width } ) => {
180
+ if ( tests . length === 0 ) {
181
+ return null ;
182
+ }
183
+
184
+ return (
185
+ < Box paddingBottom = { 1 } flexDirection = "column" >
186
+ { tests . map ( ( [ path , config ] ) => (
187
+ < Box key = { path + config . name } >
188
+ < Runs />
189
+ < DisplayName config = { config } />
190
+ < FormattedPath
191
+ pad = { 8 }
192
+ columns = { width }
193
+ config = { config }
194
+ testPath = { path }
195
+ />
196
+ </ Box >
197
+ ) ) }
198
+ </ Box >
199
+ ) ;
200
+ } ;
201
+
179
202
const Reporter : React . FC < Props > = ( {
180
203
register,
181
204
globalConfig,
@@ -220,22 +243,7 @@ const Reporter: React.FC<Props> = ({
220
243
width = { width }
221
244
globalConfig = { globalConfig }
222
245
/>
223
- { currentTests . length > 0 && (
224
- < Box paddingBottom = { 1 } flexDirection = "column" >
225
- { currentTests . map ( ( [ path , config ] ) => (
226
- < Box key = { path + config . name } >
227
- < Runs />
228
- < DisplayName config = { config || globalConfig } />
229
- < FormattedPath
230
- pad = { 8 }
231
- columns = { width }
232
- config = { config || globalConfig }
233
- testPath = { path }
234
- />
235
- </ Box >
236
- ) ) }
237
- </ Box >
238
- ) }
246
+ < RunningTests tests = { currentTests } width = { width } />
239
247
< Summary
240
248
aggregatedResults = { aggregatedResults }
241
249
options = { { estimatedTime, roundTime : true , width } }
0 commit comments