How can I make mocha run with System.js handling all require/import statements? I have a React component which does an import of CSS file. When running on browser System.js gets loaded and it's plugin-css handles import of css files. But when running as a Mocha unit test import of a css file causes Mocha to crash.
import '../../../dist/css/common/NavBar.css!';
throws error Error: Cannot find module '../../../dist/css/common/NavBar.css!'
Does anyone have a similar test setup up and running ?
Aucun commentaire:
Enregistrer un commentaire