A Mocha plugin that compiles JavaScript files through the Traceur transpiler, enabling ES6 (ES2015) features for test files. Version 2.1.0 is the current stable release, depending on 'traceur-runner' for stack traces and optional dependency compilation. It operates via Mocha's --compilers flag. Key differentiator vs alternatives like babel-register: focused solely on Traceur, with no dependency compilation by default, making it lightweight but restrictive. The package is maintained infrequently; latest release 2.1.0 is several years old. Does not bundle Traceur itself, requiring a separate install.
npm install mocha-traceurNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Setup and run Mocha tests with Traceur transpilation via --compilers flag, demonstrating ES6 arrow functions and template literals.
Use only transpiled dependencies, or switch to babel-register which can transpile node_modules via ignore patterns.
Migrate to a modern transpiler like Babel with @babel/register.
Run: npm install --save-dev traceur or traceur-runner
Ensure all dependencies are pre-transpiled, or pin to v1.x if dependency transpilation is required.
Run: npm install --save-dev traceur
Use command: mocha --compilers js:mocha-traceur test/*.js (ensure the flag uses the correct path to mocha-traceur).
Ensure --compilers is set correctly and that your test files match the pattern (e.g., .js). Add 'use strict' if needed.