babel-mocha-es6-compiler

raw JSON →
0.1.0 verified Fri May 01 auth: no javascript deprecated

Babel Mocha ES6 Compiler is a deprecated Mocha compiler that registers Babel 6 with React JSX and ES6 support. No version updates since 2016; relies on older Babel 6 ecosystem. Not compatible with Babel 7+ or modern Mocha releases. For new projects, use @babel/register directly with Mocha's --require flag.

error Error: Cannot find module 'babel-mocha-es6-compiler'
cause Package not installed or not in node_modules.
fix
Run 'npm install babel-mocha-es6-compiler --save-dev' in the project root.
error TypeError: The 'compilers' option is deprecated. Use 'require' instead.
cause Mocha v8+ removed --compilers support.
fix
Use '--require @babel/register' and configure Babel presets separately.
deprecated Package relies on Babel 6, which is end-of-life. Not compatible with Babel 7+.
fix Use @babel/register and @babel/preset-env with Mocha --require instead.
gotcha The --compilers flag in Mocha v8+ is deprecated, causing warnings. The package may fail silently.
fix Use --require and configure Babel explicitly (e.g., --require @babel/register).
npm install babel-mocha-es6-compiler
yarn add babel-mocha-es6-compiler
pnpm add babel-mocha-es6-compiler

Shows how to install the package and run Mocha tests with ES6+JSX support.

npm install babel-mocha-es6-compiler --save-dev 
mocha --compilers .:babel-mocha-es6-compiler