renderComponent = (jsx, renderToDOM) => {
  if (renderToDOM) {
    const testDiv = document.createElement('div');
    document.body.appendChild(testDiv);
    return render(jsx, testDiv);
  }
  return ReactTestUtils.renderIntoDocument(jsx);
}
getBoundingClientRect() does not work correctly with ReactTestUtils.renderIntoDocument().
So for testing resizing we need  ReactDOM.render()