Skip to content

Commit 1f2c044

Browse files
committed
fix: fixed jest aliased imports
1 parent aba281d commit 1f2c044

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

jest.config.js

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ module.exports = {
55
moduleNameMapper: {
66
'.+\\.(css|styl|less|sass|scss)$': `identity-obj-proxy`,
77
'.+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': `<rootDir>/tests/file-mock.js`,
8+
'^@src(.*)$': '<rootDir>/src/$1',
9+
'^@common(.*)$': '<rootDir>/src/components/common/$1',
10+
'^@components(.*)$': '<rootDir>/src/components/$1',
11+
'^@pages(.*)$': '<rootDir>/src/pages/shared$1',
812
},
913
testPathIgnorePatterns: [`node_modules`, `.cache`, `public`, `cypress`],
1014
transformIgnorePatterns: [`node_modules/(?!(gatsby)/)`],

0 commit comments

Comments
 (0)