Registry / testing / babel-mocha-es6-compiler

babel-mocha-es6-compiler

JSON →
library0.1.0jsnpmunverified

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.

npm install babel-mocha-es6-compiler
INSTALL
IMPORT
SIG · BABEL-MOCHA-ES6-CO
B
babel-mocha-es6-compiler
testingjavascriptv0.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
mocha --compilers .:babel-mocha-es6-compiler
mocha --compilers js:babel-mocha-es6-compiler
The dot '.' acts as a wildcard for all file extensions. Using a specific extension like 'js' may cause issues with .jsx files.

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
Debug
Known issues
deprecatedPackage 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.
affects: >=0
gotchaThe --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).
affects: >=8
Errors
Common errors & fixes
Error: Cannot find module 'babel-mocha-es6-compiler'
Package not installed or not in node_modules.
fix
Run 'npm install babel-mocha-es6-compiler --save-dev' in the project root.
TypeError: The 'compilers' option is deprecated. Use 'require' instead.
Mocha v8+ removed --compilers support.
fix
Use '--require @babel/register' and configure Babel presets separately.
Upgrade
Version history
0.1.0latest on npm
Audit
Dependencies
babel-registerrequiredCore Babel 6 registration; this package wraps babel-register for Mocha
Agent activity
16 hits · last 30 days
node
14
OpenAI (training)
1
Resources
babel-mocha-es6-compiler — npm install babel-mocha-es6-compiler · libregistry