title: How to test the value of the props of react component rendered using react testing library
body: <pre><code>&lt;Abc&gt; 
    &lt;Xyz data-testid=&quot;comp-xyz&quot; prop1={pqr}/&gt;
  &lt;/Abc&gt;
  </code></pre>
  <p>Here if Abc is a class component and we are testing Abc using react testing library, then is there a way to test the value of prop1 ?</p>
  <pre class="lang-js prettyprint-override"><code>const {getByTestId} = render(&lt;Abc /&gt;)
  </code></pre>
  <p>Now I grab the component Xyz using testId
  <code>getByTestId(&quot;comp-xyz&quot;)</code></p>
  <p>Can I get props of this component something like this ?
  <code>getByTestId(&quot;comp-xyz&quot;).props()</code> ?</p>