title: Meteorjs Reactjs Enzyme test inline functions
body: <p>I'm using Meteor in the backend and React in the frontend.</p>
  
  <p>The Following Component simply takes every Element from the MongoCollection TestCollection and displays the data using a Component called ListElement. I'm using the package  <code>TrackerReact</code> to update my List Component everytime the Collection Updates</p>
  
  <pre><code>export default class List extends TrackerReact(Component){
  
   displayCollection(){
       return TestCollection.find({}).fetch().map((element)=&gt;
           &lt;ListElement key={element._id} name={element.name} /&gt;
     );
   }
  
   render(){
          &lt;div className="main"&gt;
              {displayCollection()}
          &lt;/div&gt;
  
    }
  
  } 
  </code></pre>
  
  <p>Next I want to test the Component by adding test data into the collection and checking that ListElements are added to my list using Enzyme</p>
  
  <pre><code>describe('&lt;List /&gt;', () =&gt; {
   it('Test', () =&gt; {
     const wrapper = mount(&lt;List&gt;);
     // check component content
     expect(wrapper.find("div.main")).to.have.length(1);
  
     // insert dummy date to Collection
     StubCollections.add([TestCollection]);
     StubCollections.stub();
     TestCollection.insert({name:" marko"});
     expect(TestCollection.find().count()).to.equal(1);
  
     //Test Output
     console.log(wrapper.find("div.main").text());
     console.log(wrapper.find("div.main").html());
     });
  
  });
  </code></pre>
  
  <p>The Problem I have how, is that my Test Output show no value for the text()  function and the html() only return: </p>
  
  <pre><code>            &lt;div className="main"&gt; &lt;/div&gt;
  </code></pre>
  
  <p>How can I test it properly?</p>