title: React + Material UI testing with jest
body: <p>I use this library for UI: <a href="https://github.com/callemall/material-ui" rel="nofollow">https://github.com/callemall/material-ui</a> and use Jest for unit testing. </p>
  
  <p>But when I require a component use that library I got the error syntax error. Other components are with jest.</p>
  
  <pre><code> - SyntaxError: /Users/cuongcua/Work/AgencyRevolution/frontend.react.revolution/src/js/components/CampaignStepViewer.js: /Users/cuongcua/Work/AgencyRevolution/frontend.react.revolution/node_modules/material-ui/src/index.js: /Users/cuongcua/Work/AgencyRevolution/frontend.react.revolution/node_modules/material-ui/src/js/app-bar.jsx: /Users/cuongcua/Work/AgencyRevolution/frontend.react.revolution/node_modules/material-ui/src/js/icon-button.jsx: Unexpected token {
          at Contextify.sandbox.run (/Users/cuongcua/Work/AgencyRevolution/frontend.react.revolution/node_modules/jest-cli/node_modules/jsdom/node_modules/contextify/lib/contextify.js:12:24)
          at JSDomEnvironment.runSourceText (/Users/cuongcua/Work/AgencyRevolution/frontend.react.revolution/node_modules/jest-cli/src/JSDomEnvironment.js:106:22)
          at Object.runContentWithLocalBindings (/Users/cuongcua/Work/AgencyRevolution/frontend.react.revolution/node_modules/jest-cli/src/lib/utils.js:341:23)
          at Loader._execModule (/Users/cuongcua/Work/AgencyRevolution/frontend.react.revolution/node_modules/jest-cli/src/HasteModuleLoader/HasteModuleLoader.js:245:9)
          at Loader.requireModule (/Users/cuongcua/Work/AgencyRevolution/frontend.react.revolution/node_modules/jest-cli/src/HasteModuleLoader/HasteModuleLoader.js:900:12)
          at Loader.requireModuleOrMock (/Users/cuongcua/Work/AgencyRevolution/frontend.react.revolution/node_modules/jest-cli/src/HasteModuleLoader/HasteModuleLoader.js:921:17)
          at /Users/cuongcua/Work/AgencyRevolution/frontend.react.revolution/node_modules/material-ui/src/js/app-bar.jsx:3:16
          at Object.runContentWithLocalBindings (/Users/cuongcua/Work/AgencyRevolution/frontend.react.revolution/node_modules/jest-cli/src/lib/utils.js:357:17)
          at Loader._execModule (/Users/cuongcua/Work/AgencyRevolution/frontend.react.revolution/node_modules/jest-cli/src/HasteModuleLoader/HasteModuleLoader.js:245:9)
          at Loader.requireModule (/Users/cuongcua/Work/AgencyRevolution/frontend.react.revolution/node_modules/jest-cli/src/HasteModuleLoader/HasteModuleLoader.js:900:12)
          at Loader.requireModuleOrMock (/Users/cuongcua/Work/AgencyRevolution/frontend.react.revolution/node_modules/jest-cli/src/HasteModuleLoader/HasteModuleLoader.js:921:17)
          at /Users/cuongcua/Work/AgencyRevolution/frontend.react.revolution/node_modules/material-ui/src/index.js:2:11
          at Object.runContentWithLocalBindings (/Users/cuongcua/Work/AgencyRevolution/frontend.react.revolution/node_modules/jest-cli/src/lib/utils.js:357:17)
          at Loader._execModule (/Users/cuongcua/Work/AgencyRevolution/frontend.react.revolution/node_modules/jest-cli/src/HasteModuleLoader/HasteModuleLoader.js:245:9)
          at Loader.requireModule (/Users/cuongcua/Work/AgencyRevolution/frontend.react.revolution/node_modules/jest-cli/src/HasteModuleLoader/HasteModuleLoader.js:900:12)
          at Loader.requireModuleOrMock (/Users/cuongcua/Work/AgencyRevolution/frontend.react.revolution/node_modules/jest-cli/src/HasteModuleLoader/HasteModuleLoader.js:921:17)
          at /Users/cuongcua/Work/AgencyRevolution/frontend.react.revolution/src/js/components/CampaignStepViewer.js:4:11
          at Object.runContentWithLocalBindings (/Users/cuongcua/Work/AgencyRevolution/frontend.react.revolution/node_modules/jest-cli/src/lib/utils.js:357:17)
          at Loader._execModule (/Users/cuongcua/Work/AgencyRevolution/frontend.react.revolution/node_modules/jest-cli/src/HasteModuleLoader/HasteModuleLoader.js:245:9)
          at Loader.requireModule (/Users/cuongcua/Work/AgencyRevolution/frontend.react.revolution/node_modules/jest-cli/src/HasteModuleLoader/HasteModuleLoader.js:900:12)
          at Loader.requireModuleOrMock (/Users/cuongcua/Work/AgencyRevolution/frontend.react.revolution/node_modules/jest-cli/src/HasteModuleLoader/HasteModuleLoader.js:921:17)
          at Spec.&lt;anonymous&gt; (/Users/cuongcua/Work/AgencyRevolution/frontend.react.revolution/src/js/components/__tests__/CampaignStepViewer-test.js:10:26)
          at jasmine.Block.execute (/Users/cuongcua/Work/AgencyRevolution/frontend.react.revolution/node_modules/jest-cli/vendor/jasmine/jasmine-1.3.0.js:1065:17)
          at jasmine.Queue.next_ (/Users/cuongcua/Work/AgencyRevolution/frontend.react.revolution/node_modules/jest-cli/vendor/jasmine/jasmine-1.3.0.js:2098:31)
          at null._onTimeout (/Users/cuongcua/Work/AgencyRevolution/frontend.react.revolution/node_modules/jest-cli/vendor/jasmine/jasmine-1.3.0.js:2088:18)
          at Timer.listOnTimeout [as ontimeout] (timers.js:112:15)
  </code></pre>
  
  <p>I have update jest at package.json below: </p>
  
  <pre><code>"unmockedModulePathPatterns": [
        "/node_modules/debug",
        "/node_modules/react",
        "/node_modules/material-ui",
        "/node_modules"
      ] 
  </code></pre>
  
  <p>It does not work. </p>