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
jest-preview currently doesn't support CSS Modules, and given the popularity of CSS Modules, jest-preview should support it out of the box.
How
Not sure how to implement this feature, we may need to explore how CSS Modules works and mimic the behaviors. One possible solution is through a transform
How create react app currently handle CSS Modules in jest:
They use identity-obj-proxy which transform imported className to string
Why
jest-preview
currently doesn't supportCSS Modules
, and given the popularity ofCSS Modules
,jest-preview
should support it out of the box.How
transform
CSS Modules
in jest:identity-obj-proxy
which transform imported className to stringReference:
https://github.com/facebook/create-react-app/blob/63bba07d584a769cfaf7699e0aab92ed99c3c57e/packages/react-scripts/scripts/utils/createJestConfig.js#L58
When
0.1.x
/0.2.x
The text was updated successfully, but these errors were encountered: