@@ -61,26 +61,26 @@ describe('[INTEGRATION] index', function() {
61
61
it ( 'should detect paths' , function ( ) {
62
62
var plugin = new ForkTsCheckerWebpackPlugin ( { tslint : true } ) ;
63
63
64
- expect ( plugin . tsconfig ) . to . be . equal ( './tsconfig.json' ) ;
65
- expect ( plugin . tslint ) . to . be . equal ( './tslint.json' ) ;
64
+ expect ( plugin . tsconfig ) . to . equal ( './tsconfig.json' ) ;
65
+ expect ( plugin . tslint ) . to . equal ( './tslint.json' ) ;
66
66
} ) ;
67
67
68
68
it ( 'should set logger to console by default' , function ( ) {
69
69
var plugin = new ForkTsCheckerWebpackPlugin ( { } ) ;
70
70
71
- expect ( plugin . logger ) . to . be . equal ( console ) ;
71
+ expect ( plugin . logger ) . to . equal ( console ) ;
72
72
} ) ;
73
73
74
74
it ( 'should set watch to empty array by default' , function ( ) {
75
75
var plugin = new ForkTsCheckerWebpackPlugin ( { } ) ;
76
76
77
- expect ( plugin . watch ) . to . be . deep . equal ( [ ] ) ;
77
+ expect ( plugin . watch ) . to . deep . equal ( [ ] ) ;
78
78
} ) ;
79
79
80
80
it ( 'should set watch to one element array for string' , function ( ) {
81
81
var plugin = new ForkTsCheckerWebpackPlugin ( { watch : '/test' } ) ;
82
82
83
- expect ( plugin . watch ) . to . be . deep . equal ( [ '/test' ] ) ;
83
+ expect ( plugin . watch ) . to . deep . equal ( [ '/test' ] ) ;
84
84
} ) ;
85
85
86
86
it ( 'should work without configuration' , function ( callback ) {
@@ -227,8 +227,8 @@ describe('[INTEGRATION] index', function() {
227
227
} ) ;
228
228
229
229
function compareResults ( ) {
230
- expect ( errorsA ) . to . be . deep . equal ( errorsB ) ;
231
- expect ( warningsA ) . to . be . deep . equal ( warningsB ) ;
230
+ expect ( errorsA ) . to . deep . equal ( errorsB ) ;
231
+ expect ( warningsA ) . to . deep . equal ( warningsB ) ;
232
232
callback ( ) ;
233
233
}
234
234
} ) ;
@@ -284,7 +284,7 @@ describe('[INTEGRATION] index', function() {
284
284
var compiler = createCompiler ( { } , true ) ;
285
285
286
286
compiler . run ( function ( error , stats ) {
287
- expect ( stats . compilation . errors . length ) . to . be . equal ( 1 ) ;
287
+ expect ( stats . compilation . errors . length ) . to . equal ( 1 ) ;
288
288
callback ( ) ;
289
289
} ) ;
290
290
} ) ;
@@ -293,7 +293,20 @@ describe('[INTEGRATION] index', function() {
293
293
var compiler = createCompiler ( { checkSyntacticErrors : true } , true ) ;
294
294
295
295
compiler . run ( function ( error , stats ) {
296
- expect ( stats . compilation . errors . length ) . to . be . equal ( 2 ) ;
296
+ expect ( stats . compilation . errors . length ) . to . equal ( 2 ) ;
297
+ callback ( ) ;
298
+ } ) ;
299
+ } ) ;
300
+
301
+ it ( 'should only show errors matching paths specified in reportFiles when provided' , function ( callback ) {
302
+ var compiler = createCompiler (
303
+ { checkSyntacticErrors : true , reportFiles : [ '**/index.ts' ] } ,
304
+ true
305
+ ) ;
306
+
307
+ compiler . run ( function ( error , stats ) {
308
+ expect ( stats . compilation . errors . length ) . to . equal ( 1 ) ;
309
+ expect ( stats . compilation . errors [ 0 ] . file . endsWith ( 'index.ts' ) ) . to . be . true ;
297
310
callback ( ) ;
298
311
} ) ;
299
312
} ) ;
0 commit comments