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<{
81
81
82
82
const CompletedTests : React . FC < {
83
83
completedTests : State [ 'completedTests' ] ;
84
- width : number ;
85
84
globalConfig : Config . GlobalConfig ;
86
- } > = ( { completedTests, width , globalConfig } ) => {
85
+ } > = ( { completedTests, globalConfig } ) => {
87
86
if ( completedTests . length === 0 ) {
88
87
return null ;
89
88
}
@@ -94,11 +93,7 @@ const CompletedTests: React.FC<{
94
93
< Static >
95
94
{ completedTests . map ( ( { testResult, config } ) => (
96
95
< 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 } />
102
97
< TestConsoleOutput
103
98
console = { testResult . console }
104
99
verbose = { globalConfig . verbose }
@@ -249,7 +244,6 @@ const Reporter: React.FC<Props> = ({
249
244
< Box flexDirection = "column" >
250
245
< CompletedTests
251
246
completedTests = { completedTests }
252
- width = { width }
253
247
globalConfig = { globalConfig }
254
248
/>
255
249
< 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 }) => {
69
69
export const ResultHeader : React . FC < {
70
70
testResult : TestResult ;
71
71
config : Config . ProjectConfig ;
72
- width : number ;
73
- } > = ( { testResult, config, width } ) => (
72
+ } > = ( { testResult, config } ) => (
74
73
< Box >
75
74
< TestStatus testResult = { testResult } />
76
75
< 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 } />
83
77
</ Box >
84
78
) ;
85
79
86
- export const FormattedPath = ( {
87
- pad,
88
- config,
89
- testPath,
90
- columns,
91
- } : {
80
+ export const FormattedPath : React . FC < {
92
81
pad : number ;
93
82
config : Config . ProjectConfig | Config . GlobalConfig ;
94
83
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 ;
98
87
const relative = relativePath ( config , testPath ) ;
99
88
const { basename } = relative ;
100
89
let { dirname } = relative ;
You can’t perform that action at this time.
0 commit comments