"This method is only meant to be run on single node. 0 found instead" Enzyme error
<p>I have a simple component that toggles sorting. When a link is clicked, it fires a function. When I run <code>shallow()</code> on it, I'm getting an error like</p>

<blockquote>
  <p>Error: This method is only meant to be run on single node. 0 found instead</p>
</blockquote>

<p>My component is:</p>

<pre><code>import React, { Component, PropTypes } from 'react';
import { sortGames } from '../actions';
import { connect } from 'react-redux';


class SortList extends Component {
    constructor(props) {
        super(props);
        this.onSortGames = this.props.onSortGames.bind(this);
    }
    componentWillMount(){
        this.setState({
            sortByIncrease: false
        })
    }
    render() {
        return (
            &lt;div className="sort"&gt;
                &lt;span&gt;Sort by:
                    &lt;a href="#" onClick={e =&gt; {
                        e.preventDefault();
                        this.props.onSortGames(this.props.filter, this.state.sortByIncrease);
                        this.setState({
                            sortByIncrease: !this.state.sortByIncrease
                        });
                    }}&gt;
                        { (this.state.sortByIncrease) ? "Decrease" : "Increase" }
                    &lt;/a&gt;
                &lt;/span&gt;
            &lt;/div&gt;
        )
    }
}

SortList.propTypes = {
    onSortGames: PropTypes.func.isRequired
};

const mapStateToProps = (state) =&gt; ({
    games: state.games
});
const mapDispatchToProps = (dispatch) =&gt; ({
    onSortGames(filter, asc) {
        dispatch(sortGames(filter, asc));
    }
});

export default connect(
    mapStateToProps,
    mapDispatchToProps
)(SortList);
</code></pre>

<p>and here is my test script:</p>

<pre><code>import React from 'react';
import {expect} from 'chai';
import { shallow, mount } from 'enzyme';
import sinon from 'sinon';
import SortList from '../components/SortList';
import configureStore from '../configureStore';

describe('SortList', () =&gt; {
    const store = configureStore();

    const props = {
        filter: "all",
        sortByIncrease: false,
        onSortGames : (a,b) =&gt; {}
    };

    it('should render sort list component', () =&gt; {
        const wrapper = shallow(&lt;SortList {...props} store={store}&gt;&lt;/SortList&gt;);
        expect(wrapper.length).to.equal(1);
    });

    it('should call sorting function when clicked', () =&gt; {
        const onSortGames = sinon.spy();
        const wrapper = shallow(&lt;SortList {...props} store={store}&gt;&lt;/SortList&gt;);
        console.log(wrapper.debug());
        wrapper.find('a').simulate('click');
        expect(onSortGames.calledOnce).to.equal(true);
    });
});
</code></pre>

<p>The <code>console.log(wrapper.debug());</code> statement prints</p>

<blockquote>
  <p><code>&lt;SortList filter="all" sortByIncrease={false} onSortGames={[Function]} store={{...}} games={{...}} /&gt;</code></p>
</blockquote>

<p>What am I doing wrong? It has to be reaching the <code>a</code> tag, I believe, but still...</p>