@@ -70,11 +70,8 @@ const TestConsoleOutput = ({
7070} ;
7171
7272const CompletedTests : React . FC < {
73- completedTests : Array < {
74- testResult : TestResult ;
75- config : Config . ProjectConfig ;
76- } > ;
77- width ?: number ;
73+ completedTests : State [ 'completedTests' ] ;
74+ width : number ;
7875 globalConfig : Config . GlobalConfig ;
7976} > = ( { completedTests, width, globalConfig } ) => {
8077 if ( completedTests . length === 0 ) {
@@ -86,7 +83,7 @@ const CompletedTests: React.FC<{
8683 < Box paddingBottom = { 1 } flexDirection = "column" >
8784 < Static >
8885 { completedTests . map ( ( { testResult, config } ) => (
89- < React . Fragment key = { testResult . testFilePath } >
86+ < React . Fragment key = { testResult . testFilePath + config . name } >
9087 < ResultHeader
9188 config = { config || globalConfig }
9289 testResult = { testResult }
@@ -176,6 +173,32 @@ const reporterReducer: React.Reducer<State, DateEvents> = (
176173 }
177174} ;
178175
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+
179202const Reporter : React . FC < Props > = ( {
180203 register,
181204 globalConfig,
@@ -220,22 +243,7 @@ const Reporter: React.FC<Props> = ({
220243 width = { width }
221244 globalConfig = { globalConfig }
222245 />
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 } />
239247 < Summary
240248 aggregatedResults = { aggregatedResults }
241249 options = { { estimatedTime, roundTime : true , width } }
0 commit comments