File tree 1 file changed +10
-0
lines changed
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -346,6 +346,16 @@ if (program.forbidPending) mocha.forbidPending();
346
346
347
347
// custom compiler support
348
348
349
+ if ( program . compilers . length > 0 ) {
350
+ require ( "util" ) . deprecate ( function ( ) { } , [
351
+ "`--compilers` is likely to be replaced in a future version of Mocha." ,
352
+ "Instead use `--require` to load the compiler and add your file extension(s) to your filepath globs." ,
353
+ "To glob for multiple file extensions, \"quote\" the path and use `@(one|the-other)`, e.g. \"test/**/*.spec.@(js|coffee)\""
354
+ ]
355
+ . concat ( program . watch ? [ "With `--watch`, also add the extensions through `--watch-extensions`" ] : [ ] )
356
+ . join ( "\n" )
357
+ ) ( )
358
+ }
349
359
var extensions = [ 'js' ] ;
350
360
program . compilers . forEach ( function ( c ) {
351
361
var idx = c . indexOf ( ':' ) ;
You can’t perform that action at this time.
0 commit comments