title: How to fix "styles$6.makeStyles is not a function" in jest unit tests?
body: <p>I am working in a form component, inside this form I am using <b>DateTimePicker</b> and <b>MuiPickersUtilsProvider</b> in oder to show two DateTime fields. Everything compiles and run fine, but writing the unit test I am getting a compilation error:</p>
  
  <pre><code>    TypeError: styles$6.makeStyles is not a function
  
         9 | import Tab from '@material-ui/core/Tab';
        10 | import DateFnsUtils from '@date-io/date-fns';
      &gt; 11 | import { DateTimePicker, MuiPickersUtilsProvider } from '@material-ui/pickers';
           | ^
        12 | 
        13 | import {
        14 |     inputProps,
  
  </code></pre>
  
  <p>In order to fix it, I create a component and wrap the Form and other components needed with <code>withStyles(styles)</code> but still I got the same issue. At some point a removed from the project all the references to <b>@material-ui/pickers</b> and everything works fine.</p>
  
  <p>This is how I tried to fix the problem, I created a wrapper component <b>TestWrapperComponent</b> with the following code:</p>
  
  <pre><code>import React from 'react';
  import {createMuiTheme, MuiThemeProvider} from "@material-ui/core";
  import Form from '../Form';
  
  const Theme = createMuiTheme({...});
  
  export default withStyles(styles)(class TestWrapperComponent extends React.Component {
  
      render() {
          return &lt;StateProvider initialState={{
              displaySuccessMsg: false,
          }} reducer={reducer}&gt;
              &lt;MuiThemeProvider theme={Theme}&gt;
                   &lt;Form/&gt;
              &lt;/MuiThemeProvider&gt;
          &lt;/StateProvider&gt;
      }
  });
  
  </code></pre>
  
  <p>The Form component is named <b>Form</b></p>
  
  <p>I was expecting that <code>withStyles(styles)</code> would fix the issue, but I haven't had success. I also search all over google, and have not find anything meaningful.</p>