File tree 2 files changed +15
-4
lines changed
2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -317,6 +317,7 @@ function _minWidth (col) {
317
317
}
318
318
319
319
function getWindowWidth ( ) {
320
+ /* istanbul ignore next: depends on terminal */
320
321
if ( typeof process === 'object' && process . stdout && process . stdout . columns ) {
321
322
return process . stdout . columns
322
323
}
@@ -337,16 +338,17 @@ function alignCenter (str, width) {
337
338
str = str . trim ( )
338
339
const strWidth = stringWidth ( str )
339
340
340
- if ( strWidth < width ) {
341
- return ' ' . repeat ( ( width - strWidth ) >> 1 ) + str
341
+ /* istanbul ignore next */
342
+ if ( strWidth >= width ) {
343
+ return str
342
344
}
343
345
344
- return str
346
+ return ' ' . repeat ( ( width - strWidth ) >> 1 ) + str
345
347
}
346
348
347
349
module . exports = function ( opts = { } ) {
348
350
return new UI ( {
349
- width : opts . width || getWindowWidth ( ) || 80 ,
351
+ width : opts . width || getWindowWidth ( ) || /* istanbul ignore next */ 80 ,
350
352
wrap : opts . wrap !== false
351
353
} )
352
354
}
Original file line number Diff line number Diff line change
1
+ 'use strict'
2
+
3
+ module . exports = {
4
+ checkCoverage : true ,
5
+ functions : 100 ,
6
+ lines : 100 ,
7
+ branches : 100 ,
8
+ statements : 100
9
+ }
You can’t perform that action at this time.
0 commit comments