title: Jest: Imported class 'undefined'
body: <p>Importing class Grid into test file but keep on getting errors that its undefined.</p>
  
  <p>The import path is correct but I keep on getting "TypeError: Cannot read property 'grid' of undefined" and "Cannot read property 'instance' of undefined" in the console when I run Jest. </p>
  
  <p>Grid.test.js</p>
  
  <pre><code>import React from 'react';
  import {shallow} from 'enzyme';
  import Grid from '../../components/Grid';
  
  let grid;
  
  describe('Grid', () =&gt; {
  
      beforeEach(() =&gt; {
          grid = shallow(&lt;Grid/&gt;);
      });
  
      it('renders correctly', () =&gt; {
          expect(grid).toMatchSnapshot();
      });
  
      describe('splitUpTiles', () =&gt; {
  
          it('returns an empty array if a.length === 0', () =&gt; {
              expect(grid.instance().splitUpTiles([0,1], 0)).toEqual([]);
          });
      });
  
  });
  </code></pre>
  
  <p>Grid.js:</p>
  
  <pre><code>import React, { Component } from 'react';
  import Tile from './Tile';
  
  class Grid extends Component {
  
  splitUpTiles = (a, l) =&gt; {
      if (a.length === 0) return [];
      else return [a.slice(0, l)].concat(this.splitUpTiles(a.slice(l), l));
  };
  
  (omitted code for brevity) 
  
          render() {
  
  (omitted code for brevity)
  
          return (
          &lt;div&gt;
              &lt;table&gt;
                  &lt;tbody&gt;
                  {this.createColumns(arrayOfTiles)}
                  &lt;/tbody&gt;
              &lt;/table&gt;
          &lt;/div&gt;
       )
     }
   }
  
  export default Grid;
  </code></pre>
  
  <p>I tested my other files in the same way but had no error. Can someone please explain where I am going wrong?</p>