Skip to content
This repository was archived by the owner on Jan 13, 2023. It is now read-only.

Commit

Permalink
Fix jest config to import .css
Browse files Browse the repository at this point in the history
  • Loading branch information
WatanabeToshimitsu committed Feb 7, 2022
1 parent 153d9ff commit f4faaea
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
8 changes: 8 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,12 @@ module.exports = {
setupFilesAfterEnv: ["./src/setupTest.ts"],
testEnvironment: "jsdom",
verbose: true,
transform: {
"^.+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$":
"jest-transform-stub",
},
moduleNameMapper: {
"^.+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$":
"jest-transform-stub",
},
};
13 changes: 13 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
"eslint-plugin-unused-imports": "^1.1.5",
"husky": "^7.0.4",
"jest": "^27.4.7",
"jest-transform-stub": "^2.0.0",
"lint-staged": "^12.3.3",
"loki": "^0.28.1",
"npm-run-all": "^4.1.5",
Expand Down

0 comments on commit f4faaea

Please sign in to comment.