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
If this is like the above issues, it might be that the stylesheets are not being applied to the DOM in the Jest environment, so the style matching doesn't work.
Indeed what @jadengis said.
Also, I wouldn't encourage to test the styles because this can be brittle.
You could check for classnames, or what I tend to do is to use data attributes.
Hi guys,
I'm try to test styles of a component with .toHaveStyle in the library, but I think, it's not possible.
Can I test a prop in class css?
I show you my code:
button.component.ts
my test button.component.spec.ts
And the error show me:
I try test if my background-color is different in default and primary colors
The text was updated successfully, but these errors were encountered: