How to set the width of a React component during test?
问题 I'm trying to test a slider component. This slider component can be variable in width. When you click on the "track" of the slider it should change the value and trigger an onChange callback. The value is a based on where you click on the track. If you click the halfway point when the min value is 100 and the max value is 200 , then it should report a value of 150 . The problem I'm running into is that when I render the component using ReactTest.renderIntoDocument the component doesn't have