Created
January 9, 2018 20:08
-
-
Save danew/7ae5aa39fbe18d3aa0042c35a24a51ce to your computer and use it in GitHub Desktop.
Jest mock for CSS that supports multiple CSSModules
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = new Proxy({}, { get: () => 'cssMock' }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"jest": { | |
"moduleNameMapper": { | |
".*\\.(css|less|styl|scss|sass)$": "<rootDir>/internals/mocks/cssMock.js", | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment