File tree 3 files changed +7
-1
lines changed
3 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ var plur = require('plur');
6
6
var spinners = require ( 'cli-spinners' ) ;
7
7
var chalk = require ( 'chalk' ) ;
8
8
var colors = require ( '../colors' ) ;
9
+ var cliTruncate = require ( 'cli-truncate' ) ;
9
10
10
11
chalk . enabled = true ;
11
12
Object . keys ( colors ) . forEach ( function ( key ) {
@@ -75,7 +76,7 @@ MiniReporter.prototype.prefix = function (str) {
75
76
} ;
76
77
77
78
MiniReporter . prototype . _test = function ( test ) {
78
- var title = test . title ;
79
+ var title = cliTruncate ( test . title , process . stdout . columns - 3 ) ;
79
80
80
81
if ( test . todo ) {
81
82
this . todoCount ++ ;
Original file line number Diff line number Diff line change 89
89
"chalk" : " ^1.0.0" ,
90
90
"cli-cursor" : " ^1.0.2" ,
91
91
"cli-spinners" : " ^0.1.2" ,
92
+ "cli-truncate" : " ^0.1.0" ,
92
93
"co-with-promise" : " ^4.6.0" ,
93
94
"common-path-prefix" : " ^1.0.0" ,
94
95
"convert-source-map" : " ^1.1.2" ,
Original file line number Diff line number Diff line change @@ -9,6 +9,10 @@ chalk.enabled = true;
9
9
10
10
var graySpinner = chalk . gray . dim ( '⠋' ) ;
11
11
12
+ // Needed because tap doesn't emulate a tty environment and thus this is
13
+ // undefined, making `cli-truncate` append '...' to test titles
14
+ process . stdout . columns = 5000 ;
15
+
12
16
function miniReporter ( ) {
13
17
var reporter = _miniReporter ( ) ;
14
18
reporter . start = function ( ) {
You can’t perform that action at this time.
0 commit comments