title: Jest encountered an unexpected token
body: <p>Not sure why it's complaining on this line:</p>
  
  <p><code>const wrapper = shallow(&lt;BitcoinWidget {...props} /&gt;);</code></p>
  
  <p><a href="https://i.stack.imgur.com/IeDvR.png" rel="noreferrer"><img src="https://i.stack.imgur.com/IeDvR.png" alt="enter image description here"></a></p>
  
  <p>Entire test:</p>
  
  <pre><code>import React from 'react';
  import { shallow } from 'enzyme';
  import toJson from 'enzyme-to-json';
  
  // Local components
  import BitcoinWidget from './bitcoinWidget';
  
  const props = {
    logo: 'foobar',
    coin: {
      price: 0
    },
    refresh: jest.fn()
  }
  
  describe('when rendering', () =&gt; {
    const wrapper = shallow(&lt;BitcoinWidget {...props} /&gt;);
  
    it('should render a component matching the snapshot', () =&gt; {
      const tree = toJson(wrapper);
      expect(tree).toMatchSnapshot();
      expect(wrapper).toHaveLength(1);
    });
  });
  </code></pre>
  
  <p>The component</p>
  
  <pre><code>import React from 'react';
  
  const BitcoinWidget = ({ logo, coin : { price }, refresh }) =&gt; {
    return (
      &lt;div className="bitcoin-wrapper shadow"&gt;
        &lt;header&gt;
          &lt;img src={logo} alt="Bitcoin Logo"/&gt;
        &lt;/header&gt;
        &lt;div className="price"&gt;
          Coinbase
          ${price}
        &lt;/div&gt;
        &lt;button className="btn striped-shadow white" onClick={refresh}&gt;
          &lt;span&gt;Refresh&lt;/span&gt;
        &lt;/button&gt;
      &lt;/div&gt;
    );
  }
  
  export default BitcoinWidget;
  </code></pre>
  
  <p>And my package.json</p>
  
  <pre><code>{
    "name": "bitcoin",
    "version": "0.1.0",
    "private": true,
    "dependencies": {
      "axios": "^0.18.0",
      "react": "^16.4.2",
      "react-dom": "^16.4.2",
      "react-redux": "^5.0.7",
      "react-scripts": "1.1.5",
      "redux": "^4.0.0",
      "redux-thunk": "^2.3.0"
    },
    "scripts": {
      "start": "react-scripts start",
      "build": "react-scripts build",
      "eject": "react-scripts eject",
      "test": "yarn run test-jest:update --verbose --maxWorkers=2",
      "test-jest:update": "jest src --updateSnapshot",
      "test-jest": "jest src"
    },
    "now": {
      "name": "bitcoin",
      "engines": {
        "node": "8.11.3"
      },
      "alias": "leongaban.com"
    },
    "jest": {
      "verbose": true,
      "moduleNameMapper": {
        "\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "&lt;rootDir&gt;/client/assetsTransformer.js"
      },
      "moduleFileExtensions": [
        "js",
        "jsx"
      ],
      "moduleDirectories": [
        "node_modules"
      ]
    },
    "devDependencies": {
      "enzyme": "^3.4.4",
      "enzyme-to-json": "^3.3.4",
      "jest": "^23.5.0"
    }
  }
  </code></pre>