You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have recently updated to the most recent styled-components & jest-styled-components. Now all previously working tests using toHaveStyleRule fail on all components that have their styles set using the css prop.
For example:
constStyledComp=styled('div')` // SOME STYLES`functionSomeOtherComp(props){return<StyledCompcss="font-size: 20px;"{ ...props}/>}
Within Jest now running the following fails and returns "font-size: undefined".
it('Should find the style',()=>{constwrapper=renderer.create(<SomeOtherComp/>).toJSON();expect(wrapper).toHaveStyleRule('font-size','20px');})
The text was updated successfully, but these errors were encountered:
I have recently updated to the most recent styled-components & jest-styled-components. Now all previously working tests using toHaveStyleRule fail on all components that have their styles set using the
css
prop.For example:
Within Jest now running the following fails and returns
"font-size: undefined"
.The text was updated successfully, but these errors were encountered: