title: ReferenceError: html2pdf is not defined (JSPDF)
body: <p><strong>I am getting below error when I am writing unit test with shallow rendering</strong> </p>
  
  <p><strong><em>ReferenceError: html2pdf is not defined
              at /PathToProject/node_modules/jspdf/dist/jspdf.min.js:202:16291</em></strong> </p>
  
  <pre><code>    When I comment out my unit test code whole jspdf code works fine.
      I am surprised why it is failing only when I execute unit test like below -
  
      import { expect } from "chai";
      import { shallow } from "enzyme";
      import "mocha";
      import * as React from "react";
  
      const jsdom = require("jsdom-global");
      jsdom();
      import App from "../src/app";
  
      describe("&lt;App/&gt;", () =&gt; {
        it("should do a shallow render of &lt;Provider/&gt;", () =&gt; {
  
          const elem = shallow(&lt;App/&gt;); //this line is creating issue
          expect(elem.find("Provider")).to.have.length(1);
        });
      });
  </code></pre>
  
  <p>Note: Before executing unit test everything works perfectly fine. All the jspdf functionality works well. but as soon as i am executing unit test by writing shallow it is throwing this error.</p>