Skip to content

Commit

Permalink
feat(create-plugin): supoprt mocking css/css modules in jest
Browse files Browse the repository at this point in the history
  • Loading branch information
jackw committed Oct 21, 2022
1 parent 9e292b9 commit 43be7ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
*/

module.exports = {
moduleNameMapper: {
"\\.(css|scss|sass)$": "identity-obj-proxy",
},
setupFilesAfterEnv: ['<rootDir>/jest-setup.js'],
testEnvironment: 'jest-environment-jsdom',
testMatch: [
'<rootDir>/src/**/__tests__/**/*.{js,jsx,ts,tsx}',
Expand All @@ -27,5 +31,4 @@ module.exports = {
},
],
},
setupFilesAfterEnv: ['<rootDir>/jest-setup.js'],
};
1 change: 1 addition & 0 deletions packages/create-plugin/templates/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"eslint-plugin-react-hooks": "^4.2.0",
"eslint-webpack-plugin": "^3.1.1",
"glob": "^8.0.3",
"identity-obj-proxy": "3.0.0",
"jest": "27.5.0",
"fork-ts-checker-webpack-plugin": "^7.2.0",
"prettier": "^2.5.0",
Expand Down

0 comments on commit 43be7ed

Please sign in to comment.