A Stylus compiler plugin for Mocha that allows requiring .styl files in tests, compiling them to CSS but ignoring the output (compiles to null). Version 1.0.1 is the latest and only stable release. It is a minimal tool for integrating Stylus preprocessing into Mocha test runs. Unlike alternative approaches (like using stylus directly or other Mocha compilers), this package specifically registers .styl files with Mocha's --compilers option, preventing parse errors when requiring Stylus files in tests. No updates since initial release; considered stable but unmaintained.
npm install mocha-stylus-compilerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to set up and run Mocha tests that require .styl files using the Stylus compiler.
If you need to use the compiled CSS in tests, consider using a different approach (e.g., compile Stylus files separately and read the output).
For Mocha v8+, use `--require mocha-stylus-compiler/register` if available, or switch to a compiler that supports the new API. Alternatively, downgrade Mocha to v7 or earlier.
Rename your files to .styl or modify the compiler registration to match your extension.
Install locally: `npm install --save-dev mocha-stylus-compiler` and use local Mocha: `npx mocha --compilers styl:mocha-stylus-compiler`
Use a webpack loader for Stylus files (e.g., stylus-loader) instead of this package.
Install stylus: `npm install --save-dev stylus`
No dependency data recorded yet.