Skip to content

Instantly share code, notes, and snippets.

@jackcallister
Created September 12, 2015 13:08
Show Gist options
  • Save jackcallister/b46592221b4cc1102878 to your computer and use it in GitHub Desktop.
Save jackcallister/b46592221b4cc1102878 to your computer and use it in GitHub Desktop.
Mocha Local Module CSS Compiler
require('babel/register');
// Extend to use css-modules server compiler.
// This will resolve JS objects rather than nothing, thus fixing
// nested object use - styles.thing.otherThing
require.extensions['.css'] = function (module, filename) {
return {}
}
@jackcallister
Copy link
Author

mocha --compilers js:path/to/compiler.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment