title: Testing React with Enzyme
body: <p>As a newcomer in the world of enzyme: How can I test following construction? </p>
  
  <pre><code>return (this.FAQData.context[context])
          ? this.FAQData.context[context]
          : this.FAQData.context.default;
  </code></pre>
  
  <p>code coverage (istanbul) report:</p>
  
  <p><a href="https://i.stack.imgur.com/uDGb8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uDGb8.png" alt="enter image description here"></a> </p>
  
  <p><strong>Following tests did not help, although they work successfully:</strong></p>
  
  <pre><code>it ("checks if FAQData has questions for a certain route", () =&gt; {
      let someRoute = '/dashboard';
      expect(wrapper.instance().FAQData.context[someRoute].length).not.to.be.null;
  });
  
  it ("checks if FAQData.context[someRoute] is true", () =&gt; {
      let someRoute = '/dashboard';
      let result = wrapper.instance().FAQData.context[someRoute] ? true : false;
      expect(result).to.be.true;
  });
  </code></pre>
  
  <p>P.s. (Mocha + Chai + Enzyme + Istanbul)</p>