Skip to content

Instantly share code, notes, and snippets.

@danew
Created January 9, 2018 20:08
Show Gist options
  • Save danew/7ae5aa39fbe18d3aa0042c35a24a51ce to your computer and use it in GitHub Desktop.
Save danew/7ae5aa39fbe18d3aa0042c35a24a51ce to your computer and use it in GitHub Desktop.
Jest mock for CSS that supports multiple CSSModules
module.exports = new Proxy({}, { get: () => 'cssMock' });
"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