File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -169,13 +169,13 @@ if (args.length === 0 || options.watch) {
169
169
}
170
170
171
171
if ( ! options . watch ) {
172
- reporter . report = function ( data ) {
172
+ reporter . report = function ( data , filename ) {
173
173
switch ( data [ 0 ] ) {
174
174
case 'subject' :
175
175
case 'vow' :
176
176
case 'context' :
177
177
case 'error' :
178
- _reporter . report ( data ) ;
178
+ _reporter . report ( data , filename ) ;
179
179
break ;
180
180
case 'end' :
181
181
( options . verbose || _reporter . name === 'json' ) && _reporter . report ( data ) ;
@@ -186,6 +186,7 @@ if (! options.watch) {
186
186
}
187
187
} ;
188
188
reporter . reset = function ( ) { _reporter . reset && _reporter . reset ( ) } ;
189
+ reporter . print = _reporter . print ;
189
190
190
191
files = args . map ( function ( a ) {
191
192
return path . join ( process . cwd ( ) , a . replace ( fileExt , '' ) ) ;
@@ -360,6 +361,7 @@ function importSuites(files) {
360
361
return files . reduce ( function ( suites , f ) {
361
362
var obj = require ( f ) ;
362
363
return suites . concat ( Object . keys ( obj ) . map ( function ( s ) {
364
+ obj [ s ] . _filename = f . replace ( process . cwd ( ) + '/' , '' ) + '.js' ;
363
365
return obj [ s ] ;
364
366
} ) ) ;
365
367
} , [ ] )
You can’t perform that action at this time.
0 commit comments