File tree 1 file changed +3
-1
lines changed 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 3
3
* https://jestjs.io/docs/configuration
4
4
*/
5
5
6
- const assetsKey = '\\.(jpg|jpeg|png|gif|eot|otf|webp|svg| ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga|css)$'
6
+ const assetsKey = '\\.(jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga|css)$'
7
7
8
8
const config = {
9
9
// All imported modules in your tests should be mocked automatically
@@ -85,6 +85,7 @@ const config = {
85
85
// A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module
86
86
moduleNameMapper : {
87
87
'@/(.*)' : '<rootDir>/src/$1' ,
88
+ '\\.svg$' : '<rootDir>/src/config/tests/mocks/svg.ts' ,
88
89
[ assetsKey ] : 'ts-jest' ,
89
90
} ,
90
91
@@ -178,6 +179,7 @@ const config = {
178
179
transform : {
179
180
'^.+\\.tsx?$' : 'ts-jest' ,
180
181
[ assetsKey ] : 'ts-jest' ,
182
+ '\\.svg$' : 'ts-jest' ,
181
183
} ,
182
184
183
185
// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
You can’t perform that action at this time.
0 commit comments