title: Should I verify that props were set after component mounts in my unit tests? (using Enzyme, Mocha, Chai)
body: <p>I've recently starting programming. I'm on a team who is programming in React and is using Enzyme, Mocha and Chai for unit testing. See package versions below.</p>
  
  <p>My team insists that the unit test file for each component should have the following test:</p>
  
  <pre><code>beforeEach(() =&gt; {
     component = mount(&lt;MyComponent /&gt;)
  })
  
  it('renders with correct properties', () =&gt; {
     component.setProps({
       height: 100,
       width: 500,
       placeholder: 'Some value here'
     })
     expect(component.prop('height')).to.equal(100)
     expect(component.prop('width')).to.equal(500)
     expect(component.prop('placeholder')).to.equal('Some value here')
  })
  </code></pre>
  
  <p>That's the end of the test.  To me, this test looks like it's just testing that React sets the props.  I feel we can trust what React is doing and instead should be testing how we use React to render our component.  I'd rather test the <em>affects</em> of the prop values on other props, state, and how the component renders as a result of the props.  </p>
  
  <p>But I'm new and my team thinks I'm wrong in my concern, so I thought I'd check around:  Is there value in the above test case that I'm missing?  Is it good practice?</p>
  
  <p><strong>Related Questions</strong></p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/57062372/should-i-mount-using-beforeeach-and-set-props-for-each-test-or-mount-a-specifi">Best practice on setting props in unit tests</a> (also my question)</li>
  </ul>
  
  <p><strong>Packages</strong></p>
  
  <ul>
  <li>"enzyme": "^3.3.0",</li>
  <li>"enzyme-adapter-react-16": "^1.1.1",</li>
  <li>"mocha": "^5.0.0",</li>
  <li>"chai": "3.5.0"</li>
  </ul>