I am trying to test a style attribute for a React component. What is the best way to get style params in the test?
At this moment, my best option is to test if the H
If you use jest-styled-components then you can use toHaveStyleRule as follows:
toHaveStyleRule
expect(component.find('#item-id')).toHaveStyleRule('opacity', 'red');