Skip to content

Commit

Permalink
Deprecate --compilers
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottFreeCode authored and boneskull committed Oct 2, 2017
1 parent 92beda9 commit 96318e1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions bin/_mocha
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,16 @@ if (program.forbidPending) mocha.forbidPending();

// custom compiler support

if (program.compilers.length > 0) {
require("util").deprecate(function () {}, [
"`--compilers` is likely to be replaced in a future version of Mocha.",
"Instead use `--require` to load the compiler and add your file extension(s) to your filepath globs.",
"To glob for multiple file extensions, \"quote\" the path and use `@(one|the-other)`, e.g. \"test/**/*.spec.@(js|coffee)\""
]
.concat(program.watch ? ["With `--watch`, also add the extensions through `--watch-extensions`"] : [])
.join("\n")
)()
}
var extensions = ['js'];
program.compilers.forEach(function (c) {
var idx = c.indexOf(':');
Expand Down

0 comments on commit 96318e1

Please sign in to comment.