title: How to write test cases in React using Jest
body: <p>I am working on a React project. And I am very new in writing Jest test cases. In my project I wrote a simple function and trying to test that function. But the test case is failing someone please help to overcome all errors.</p>
  <p>This is App.js</p>
  <pre><code>import React from 'react';
  import './App.css';
  import Add from './Add/Add';
  
  const App = () =&gt; {
    return (
      &lt;div className='container'&gt;
        &lt;div className='row'&gt;
          &lt;div className='col-12'&gt;
            &lt;Add&gt;&lt;/Add&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    )
  }
  
  export default App
  </code></pre>
  <p>This is Add.js</p>
  <pre><code>import React from 'react';
  
  const Add = () =&gt; {
      const addition = () =&gt; {
          const a = 10;
          const b = 10;
          const c = a + b
          return c
      }
      const myNumber = addition()
      return (
          &lt;div&gt;
              {myNumber}
          &lt;/div&gt;
      )
  }
  
  export default Add
  </code></pre>
  <p>This is Add.test.js</p>
  <pre><code>import { addition } from './Add';
  
  it('Addition testing', () =&gt; {
      expect(addition()).toBe(20)
  })
  </code></pre>
  <p>If you have any questions please put a comment</p>