title: How to unit test a style of a React Component using Jest.js?
body: <p>I'm building unit tests with JestJS <a href="https://www.npmjs.com/package/jest-cli" rel="noreferrer">(npm jest-cli)</a> and need to validate that a ReactJS element contains the CSS styles that I'm looking for.</p>
  
  <p>I tried to check</p>
  
  <pre><code>it('should highlight the selected option in the drop-down list', function() {
      var iconTriangleDown = TestUtils.findRenderedDOMComponentWithClass(dropList, 'icon-triangle-down');
  
      var iconHeight = window.getComputedStyle(iconTriangleDown.getDOMNode(), null).height;
  
      expect(iconHeight).notToEqual(''); 
  });
  </code></pre>
  
  <p>That results in 
     iconHeight === '' 
  instead of a value of pixels.</p>
  
  <p>I wonder if window is being mocked by Jest. Or if window isn't supported.</p>