title: js-cookie enzyme testing fails on testing cookie.set function
body: <p>I am trying to unit test js-cookie
  My code is like this</p>
  
  <pre><code>import Cookie from 'js-cookie'
  
  onChange (e) {
      Cookie.set('locale', e.target.value)
      window.location.reload()
    }
  </code></pre>
  
  <p>and for unit testing I am doing this</p>
  
  <pre><code>describe('LocaleDropDown', () =&gt; {
    const handleLocaleChange = sinon.spy()
    const Cookie = sinon.spy(Cookie,'set')
  
    it("when simulating a change, Cookie.set should be called", () =&gt; {
      const wrapper = shallow(&lt;LocaleDropDown onChange = {handleLocaleChange}/&gt;)
      wrapper.find('select').simulate('change', { target: { value: 'en'}})
      expect(Cookie.set.calledOnce).toBe(true)
    });
  </code></pre>
  
  <p>})</p>
  
  <p>It fails saying ReferenceError: Cookie is not defined</p>
  
  <p>How should I be testing js-cookie</p>