-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Map (s?css|sass) modules to identity-obj-proxy in jest #4419
Conversation
@@ -45,11 +45,11 @@ module.exports = (resolve, rootDir, srcRoots) => { | |||
}, | |||
transformIgnorePatterns: [ | |||
'[/\\\\]node_modules[/\\\\].+\\.(js|jsx|mjs)$', | |||
'^.+\\.module\\.css$', | |||
'^.+\\.module\\.(s?css|sass)$', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you change this regular expression to (css|sass|scss)
?
], | ||
moduleNameMapper: { | ||
'^react-native$': 'react-native-web', | ||
'^.+\\.module\\.css$': 'identity-obj-proxy', | ||
'^.+\\.module\\.(s?css|sass)$': 'identity-obj-proxy', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
e06834c
to
93bdead
Compare
We should land this with #4391. |
What's the best way to force a retry on the tests? I suspect appveyor just had a failure not caused by this commit. |
I just merged #4391, can you merge with |
Fixes #4345
SCSS and SASS modules currently aren't getting transformed, instead they are being resolved by the
fileTransform
. This PR instead sends them through theidentity-obj-proxy
so that:becomes
when using
jest
.