title: Testing component created using styled component with jest and enzyme
body: <p>I have a few tags created using styled components lib:</p>
  
  <p>component.js</p>
  
  <pre><code>....
  const NoJobs = styled.h1`
      text-align: center;
  `;
  ....
  &lt;div&gt;
    &lt;NoJobs&gt;
      No Jobs Found!!!
    &lt;/NoJobs&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I want to test this component, below is my test case:</p>
  
  <p>component.test.js</p>
  
  <pre><code>describe('&lt;JobList /&gt;', () =&gt; {
      let wrapper;
  
      beforeEach(() =&gt; {
          wrapper = shallow(&lt;JobList /&gt;);
      });
  
      it('should show "no data found" when there is no data', () =&gt; {
         expect(wrapper.contains(&lt;NoJobs&gt;No Jobs Found!!!&lt;/NoJobs&gt;)).toEqual(true);
      });
  });
  </code></pre>
  
  <p>When I run above test it show: NoJobs is not defined.</p>
  
  <p>Though if I change NoJobs with plan div tag in both component.js and component.test.js, it works fine. How can I test tags created using styled-components?</p>