I use webpack to develop a React component. Here is a simple version of it:
\'use strict\';
require(\'./MyComponent.less\');
var React = require(\'react\')
Webpack is a great tool, but I don't need to test it's behavior with my Jest unit tests, and adding a webpack build prior to running unit tests is only going to slow down the process. The text-book answer is to mock non-code dependencies using the "moduleNameMapper" option
https://facebook.github.io/jest/docs/webpack.html#handling-static-assets