File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 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');
77var chalk = require ( 'chalk' ) ;
88var cliTruncate = require ( 'cli-truncate' ) ;
99var colors = require ( '../colors' ) ;
10+ var cross = require ( 'figures' ) . cross ;
1011
1112chalk . enabled = true ;
1213Object . keys ( colors ) . forEach ( function ( key ) {
@@ -131,7 +132,7 @@ MiniReporter.prototype.reportCounts = function () {
131132 status += '\n ' + colors . todo ( this . todoCount , 'todo' ) ;
132133 }
133134
134- return status . length ? status : '\n' ;
135+ return status ;
135136} ;
136137
137138MiniReporter . prototype . finish = function ( ) {
@@ -180,7 +181,7 @@ MiniReporter.prototype.finish = function () {
180181 i ++ ;
181182
182183 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' ;
184185 } else {
185186 var title = err . type === 'rejection' ? 'Unhandled Rejection' : 'Uncaught Exception' ;
186187 var description = err . stack ? err . stack : JSON . stringify ( err ) ;
@@ -200,7 +201,7 @@ MiniReporter.prototype.finish = function () {
200201
201202MiniReporter . prototype . write = function ( str ) {
202203 cliCursor . hide ( ) ;
203- this . currentStatus = str + '\n' ;
204+ this . currentStatus = str ;
204205 this . _update ( ) ;
205206 this . statusLineCount = this . currentStatus . split ( '\n' ) . length ;
206207} ;
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ var test = require('tap').test;
44var AvaError = require ( '../../lib/ava-error' ) ;
55var _miniReporter = require ( '../../lib/reporters/mini' ) ;
66var beautifyStack = require ( '../../lib/beautify-stack' ) ;
7+ var cross = require ( 'figures' ) . cross ;
78
89chalk . enabled = true ;
910
@@ -255,7 +256,7 @@ test('results with passing tests and exceptions', function (t) {
255256 t . match ( output [ 5 ] , / E r r o r : f a i l u r e / ) ;
256257 t . match ( output [ 6 ] , / t e s t \/ r e p o r t e r s \/ m i n i \. j s / ) ;
257258 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') ) ;
259260 t . end ( ) ;
260261} ) ;
261262
@@ -291,6 +292,6 @@ test('empty results after reset', function (t) {
291292 reporter . reset ( ) ;
292293
293294 var output = reporter . finish ( ) ;
294- t . is ( output , '\n\n ' ) ;
295+ t . is ( output , '\n' ) ;
295296 t . end ( ) ;
296297} ) ;
You can’t perform that action at this time.
0 commit comments