title: How do I test this?
body: <p>I'm new to Jest and react-testing-library, so hopefully the solution to this is straight forward.</p>
  <p>What is the proper way to test the value returned through the 'onChange' prop?</p>
  <pre><code>    describe(&quot;Component.js&quot;, () =&gt; {
          test(&quot;return correct data&quot;, () =&gt; {
              render(
                  &lt;Component
                      onChange={(value) =&gt; console.log(value)}
                  /&gt;
              );
          });
      });
  </code></pre>
  <p>I would like to do something like this for 'value'.</p>
  <pre><code>expect(value).toBe(50);
  </code></pre>
  <p>For the sake of simplicity, let's say Component.js looks something like this.</p>
  <pre><code>const Component = ({onChange}) =&gt; {
     return (
        &lt;button onClick={() =&gt; onChange(50)}&gt;&lt;/button&gt;
     )
  }
  </code></pre>