File tree Expand file tree Collapse file tree 2 files changed +8
-25
lines changed Expand file tree Collapse file tree 2 files changed +8
-25
lines changed Original file line number Diff line number Diff line change @@ -81,9 +81,8 @@ const FailureMessage: React.FC<{
8181
8282const CompletedTests : React . FC < {
8383 completedTests : State [ 'completedTests' ] ;
84- width : number ;
8584 globalConfig : Config . GlobalConfig ;
86- } > = ( { completedTests, width , globalConfig } ) => {
85+ } > = ( { completedTests, globalConfig } ) => {
8786 if ( completedTests . length === 0 ) {
8887 return null ;
8988 }
@@ -94,11 +93,7 @@ const CompletedTests: React.FC<{
9493 < Static >
9594 { completedTests . map ( ( { testResult, config } ) => (
9695 < React . Fragment key = { testResult . testFilePath + config . name } >
97- < ResultHeader
98- config = { config }
99- testResult = { testResult }
100- width = { width }
101- />
96+ < ResultHeader config = { config } testResult = { testResult } />
10297 < TestConsoleOutput
10398 console = { testResult . console }
10499 verbose = { globalConfig . verbose }
@@ -249,7 +244,6 @@ const Reporter: React.FC<Props> = ({
249244 < Box flexDirection = "column" >
250245 < CompletedTests
251246 completedTests = { completedTests }
252- width = { width }
253247 globalConfig = { globalConfig }
254248 />
255249 < RunningTests tests = { currentTests } width = { width } />
Original file line number Diff line number Diff line change @@ -69,32 +69,21 @@ const TestStatus: React.FC<{ testResult: TestResult }> = ({ testResult }) => {
6969export const ResultHeader : React . FC < {
7070 testResult : TestResult ;
7171 config : Config . ProjectConfig ;
72- width : number ;
73- } > = ( { testResult, config, width } ) => (
72+ } > = ( { testResult, config } ) => (
7473 < Box >
7574 < TestStatus testResult = { testResult } />
7675 < DisplayName config = { config } />
77- < FormattedPath
78- pad = { 8 }
79- columns = { width }
80- config = { config }
81- testPath = { testResult . testFilePath }
82- />
76+ < FormatFullTestPath config = { config } testPath = { testResult . testFilePath } />
8377 </ Box >
8478) ;
8579
86- export const FormattedPath = ( {
87- pad,
88- config,
89- testPath,
90- columns,
91- } : {
80+ export const FormattedPath : React . FC < {
9281 pad : number ;
9382 config : Config . ProjectConfig | Config . GlobalConfig ;
9483 testPath : Config . Path ;
95- columns : number ;
96- } ) => {
97- const maxLength = columns - pad ;
84+ columns : number | undefined ;
85+ } > = ( { pad , config , testPath , columns } ) => {
86+ const maxLength = ( columns || Number . NaN ) - pad ;
9887 const relative = relativePath ( config , testPath ) ;
9988 const { basename } = relative ;
10089 let { dirname } = relative ;
You can’t perform that action at this time.
0 commit comments