Ask HN: How do you test React components for CSS?
What is the best way to test React components, specifically CSS? Are there any test frameworks, tricks etc to do it? Is there a way to compare CSS properties of components with Figma designs?
Usually if I need to debug css I'll check computed styles in chrome debugger. It will show you what styles are being applied to an element and where they came from [1].
[1] https://support.google.com/webdesigner/answer/9008244?hl=en
Jest is a testing framework. You'll need to plug in other libraries to test specific things. For example, use react-testing-library to test react components in various ways.
It looks like testing JS is straightforward, but not CSS?