File tree 2 files changed +7
-5
lines changed
2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ var spinners = require('cli-spinners');
7
7
var chalk = require ( 'chalk' ) ;
8
8
var cliTruncate = require ( 'cli-truncate' ) ;
9
9
var colors = require ( '../colors' ) ;
10
+ var cross = require ( 'figures' ) . cross ;
10
11
11
12
chalk . enabled = true ;
12
13
Object . keys ( colors ) . forEach ( function ( key ) {
@@ -131,7 +132,7 @@ MiniReporter.prototype.reportCounts = function () {
131
132
status += '\n ' + colors . todo ( this . todoCount , 'todo' ) ;
132
133
}
133
134
134
- return status . length ? status : '\n' ;
135
+ return status ;
135
136
} ;
136
137
137
138
MiniReporter . prototype . finish = function ( ) {
@@ -180,7 +181,7 @@ MiniReporter.prototype.finish = function () {
180
181
i ++ ;
181
182
182
183
if ( err . type === 'exception' && err . name === 'AvaError' ) {
183
- status += '\n\n ' + colors . error ( i + '. ' + err . message ) + '\n' ;
184
+ status += '\n\n ' + colors . error ( cross + ' ' + err . message ) + '\n' ;
184
185
} else {
185
186
var title = err . type === 'rejection' ? 'Unhandled Rejection' : 'Uncaught Exception' ;
186
187
var description = err . stack ? err . stack : JSON . stringify ( err ) ;
@@ -200,7 +201,7 @@ MiniReporter.prototype.finish = function () {
200
201
201
202
MiniReporter . prototype . write = function ( str ) {
202
203
cliCursor . hide ( ) ;
203
- this . currentStatus = str + '\n' ;
204
+ this . currentStatus = str ;
204
205
this . _update ( ) ;
205
206
this . statusLineCount = this . currentStatus . split ( '\n' ) . length ;
206
207
} ;
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ var test = require('tap').test;
4
4
var AvaError = require ( '../../lib/ava-error' ) ;
5
5
var _miniReporter = require ( '../../lib/reporters/mini' ) ;
6
6
var beautifyStack = require ( '../../lib/beautify-stack' ) ;
7
+ var cross = require ( 'figures' ) . cross ;
7
8
8
9
chalk . enabled = true ;
9
10
@@ -255,7 +256,7 @@ test('results with passing tests and exceptions', function (t) {
255
256
t . match ( output [ 5 ] , / E r r o r : f a i l u r e / ) ;
256
257
t . match ( output [ 6 ] , / t e s t \/ r e p o r t e r s \/ m i n i \. j s / ) ;
257
258
var next = 6 + output . slice ( 6 ) . indexOf ( '' ) + 1 ;
258
- t . is ( output [ next ] , ' ' + chalk . red ( '2. A futuristic test runner') ) ;
259
+ t . is ( output [ next ] , ' ' + chalk . red ( cross + ' A futuristic test runner') ) ;
259
260
t . end ( ) ;
260
261
} ) ;
261
262
@@ -291,6 +292,6 @@ test('empty results after reset', function (t) {
291
292
reporter . reset ( ) ;
292
293
293
294
var output = reporter . finish ( ) ;
294
- t . is ( output , '\n\n ' ) ;
295
+ t . is ( output , '\n' ) ;
295
296
t . end ( ) ;
296
297
} ) ;
You can’t perform that action at this time.
0 commit comments