title: Method “props” is only meant to be run on a single node. 0 found instead. Enzyme -Error
body: <p>In my react app I am testing my container using jest and enzyme. I am testing createAgent feature of my container. But my test fails and I come across the error below.</p>
  
  <p>Container.js</p>
  
  <pre><code>import React, { Component } from "react";
  import { connect } from "react-redux";
  import PropTypes from "prop-types";
  import { push } from "react-router-redux";
  import { getIds, getAgents, getAgent } from "../../reducers/agents";
  import {
    readAgents,
    confirmDeleteAgent,
    cancelDeleteAgent,
    deleteAgent
  } from "../../actions";
  import List from "../../components/List";
  
  class Agents extends Component {
    static propTypes = {
      //props
    };
  
    createAgent = () =&gt; {
      this.props.push("/agents/add");
    };
  
    render() {
      //render code
      return (
        &lt;button className="ui primary button" 
          onClick={this.createAgent}&gt;
          Add
        &lt;/button&gt;
      //render code
      )
    }
  };
  </code></pre>
  
  <p>containerTest.js</p>
  
  <pre><code>import React from "react";
  import ReactDOM from "react-dom";
  import { Provider } from "react-redux";
  import configureStore from "../../store/configureStore";
  import Agents from "./index";
  import { mount, shallow } from "enzyme";
  
  it("should call instance methods on agents", () =&gt; {
    const store = configureStore();
    let mockCreateAgent = jest.fn();
    Agents.prototype.createAgent = mockCreateAgent;
    const wrapper = shallow(
      &lt;Provider store={store}&gt;
        &lt;Agents /&gt;
      &lt;/Provider&gt;
    );
    wrapper.find('.ui primary button').simulate('click');
    expect(mockCreateAgent).toHaveBeenCalled();
  });
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>   Method “props” is only meant to be run on a single node. 0 found 
     instead.
  
    at ShallowWrapper.single 
      (node_modules/enzyme/build/ShallowWrapper.js:1516:17)
    at ShallowWrapper.props 
       (node_modules/enzyme/build/ShallowWrapper.js:867:21)
    at ShallowWrapper.prop 
       (node_modules/enzyme/build/ShallowWrapper.js:1075:21)
    at ShallowWrapper.simulate 
        (node_modules/enzyme/build/ShallowWrapper.js:838:28)
    at Object.&lt;anonymous&gt;.it 
        (src/containers/Agents/Agents.test.js:31:38)
        at Promise (&lt;anonymous&gt;)
    at Promise.resolve.theI.el (node_modules/p-map/index.js:42:16)
        at &lt;anonymous&gt;
  </code></pre>
  
  <p>How can I solve this issue? I am new to this testing using jest and enzyme.Any help will really appreciable.</p>