File tree 2 files changed +14
-8
lines changed
2 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -88,13 +88,15 @@ export class Ux extends UxBase {
88
88
'vertical-with-outline' ,
89
89
'vertical' ,
90
90
] ;
91
+
92
+ const defaultStyle = 'vertical-with-outline' ;
91
93
const determineBorderStyle = ( ) : TableOptions < T > [ 'borderStyle' ] => {
92
- const envVar = env . getString ( 'SF_TABLE_BORDER_STYLE' , 'headers-only-with-underline' ) ;
94
+ const envVar = env . getString ( 'SF_TABLE_BORDER_STYLE' , defaultStyle ) ;
93
95
if ( borderStyles . includes ( envVar ) ) {
94
96
return envVar as TableOptions < T > [ 'borderStyle' ] ;
95
97
}
96
98
97
- return 'headers-only-with-underline' ;
99
+ return defaultStyle ;
98
100
} ;
99
101
100
102
this . maybeNoop ( ( ) =>
Original file line number Diff line number Diff line change @@ -32,9 +32,11 @@ describe('Ux', () => {
32
32
ux . table ( { data : [ { key : 'foo' , value : 'bar' } ] , title : 'Title' } ) ;
33
33
} ) ;
34
34
expect ( stdout . replaceAll ( ' \n' , '\n' ) . trimEnd ( ) ) . to . equal ( `Title
35
- Key Value
36
- ─────────────
37
- foo bar` ) ;
35
+ ┌─────┬───────┐
36
+ │ Key │ Value │
37
+ ├─────┼───────┤
38
+ │ foo │ bar │
39
+ └─────┴───────┘` ) ;
38
40
} ) ;
39
41
40
42
it ( 'should not log anything if output is not enabled' , async ( ) => {
@@ -54,9 +56,11 @@ describe('Ux', () => {
54
56
ux . table ( opts ) ;
55
57
} ) ;
56
58
expect ( stdout . replaceAll ( ' \n' , '\n' ) . trimEnd ( ) ) . to . equal ( `Title
57
- Key Value
58
- ─────────────
59
- foo bar` ) ;
59
+ ┌─────┬───────┐
60
+ │ Key │ Value │
61
+ ├─────┼───────┤
62
+ │ foo │ bar │
63
+ └─────┴───────┘` ) ;
60
64
} ) ;
61
65
62
66
it ( 'should not log anything if output is not enabled' , async ( ) => {
You can’t perform that action at this time.
0 commit comments