Skip to content

Commit e21d5ca

Browse files
committed
fix(test): 修复 jest 配置错误
1 parent 598c9bb commit e21d5ca

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

jest.config.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
module.exports = {
22
verbose: true,
3-
roots: ['<rootDir>/components'],
3+
roots: ['<rootDir>/src'],
44
moduleNameMapper: {
55
'\\.(css|less|scss)$': 'identity-obj-proxy',
6-
'^components$': '<rootDir>/components/index.tsx',
7-
'^components(.*)$': '<rootDir>/components/$1',
6+
'^src$': '<rootDir>/src/index.tsx',
7+
'^src(.*)$': '<rootDir>/src/$1',
88
},
99
testRegex: '(/test/.*|\\.(test|spec))\\.(ts|tsx|js)$',
1010
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],

0 commit comments

Comments
 (0)