title: What is the difference between shallow & render in jest?
body: <p>In jest, what is the difference between using shallow &amp; render from enzyme?</p>
  
  <p>Here is an example of both: </p>
  
  <p>Test rendering with shallow: </p>
  
  <pre><code>import "jest";
  import * as React from "react";
  import { shallow } from "enzyme";
  import Item from "../item.component";
  
  describe("Item", () =&gt; {
    it("renders correct", () =&gt; {
      const item = {
          name: "A"
        };
  
      const component = shallow(
        &lt;Item item={item}/&gt;
      );
  
      expect(component).toMatchSnapshot();
    });
  });
  </code></pre>
  
  <p>Test rendering with render</p>
  
  <pre><code>import "jest";
  import * as React from "react";
  import { render } from "enzyme";
  import Item from "../item.component";
  
  describe("Item", () =&gt; {
    it("renders correct", () =&gt; {
      const item = {
          name: "A"
        };
  
      const component = render(
        &lt;Item item={item}/&gt;
      );
  
      expect(component).toMatchSnapshot();
    });
  });
  </code></pre>
  
  <p>What are the typical usage of these 2. I wrote all my tests with shallow, should I go back and change that to render in some cases?</p>