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
Is your feature request related to a problem? Please describe.
CSS Transform takes time. Especially after #241, processing a CSS file with PostCSS config would take 0.3 seconds on Mac M1. Those results are cached in local by default. But in CI, it's likely not to be cached, which leads to CI run longer
Describe the solution you'd like
Provide a way for users to toggle on/off processing CSS in the CI environment
Why? Since some tests can be failed if they have snapshot testing
transform: {'^.+\\.(css|scss|sass)$': ['<rootDir>/transforms/css',{transformCssInCI: false}],// default to false},
Describe how should jest-preview implements this feature
if CI
if css file => return string
if css modules => use identity-obj-proxy
See how to use "babel-like" syntax to pass configuration
Describe alternatives you've considered
None
Additional context
None
The text was updated successfully, but these errors were encountered:
When using jest.config.js or similar extension (anything except passive jest.config.json), I think user can simply make the config conditional e.g. process.env.CI ? ... : ..., no?
A benefit that has over a fixed flag like transformCssInCI: false is flexebility in determining whether you're running in CI (though CI env var is pretty universal), and whether you want CSS for any other reasons. It's also less "magic": user understands and controls the logic.
So WDYT documenting a recommended pattern under Installation?
Is your feature request related to a problem? Please describe.
CSS Transform takes time. Especially after #241, processing a CSS file with PostCSS config would take 0.3 seconds on Mac M1. Those results are cached in local by default. But in CI, it's likely not to be cached, which leads to CI run longer
Describe the solution you'd like
Describe how should jest-preview implements this feature
identity-obj-proxy
Describe alternatives you've considered
None
Additional context
None
The text was updated successfully, but these errors were encountered: