Wei Zhu
8 years ago
6 changed files with 82 additions and 65 deletions
@ -0,0 +1,48 @@ |
|||
const libDir = process.env.LIB_DIR; |
|||
|
|||
const transformIgnorePatterns = [ |
|||
'/dist/', |
|||
'/node_modules/reqwest', |
|||
]; |
|||
|
|||
if (libDir !== 'es') { |
|||
transformIgnorePatterns.push('/node_modules/'); |
|||
} |
|||
|
|||
module.exports = { |
|||
setupFiles: [ |
|||
'./tests/setup.js', |
|||
], |
|||
moduleFileExtensions: [ |
|||
'ts', |
|||
'tsx', |
|||
'js', |
|||
'jsx', |
|||
'json', |
|||
'md', |
|||
], |
|||
modulePathIgnorePatterns: [ |
|||
'/_site/', |
|||
], |
|||
testPathIgnorePatterns: [ |
|||
'/node_modules/', |
|||
'dekko', |
|||
'node', |
|||
], |
|||
transform: { |
|||
'\\.tsx?$': './node_modules/typescript-babel-jest', |
|||
'\\.js$': './node_modules/babel-jest', |
|||
'\\.md$': './node_modules/antd-demo-jest', |
|||
}, |
|||
testRegex: libDir ? 'demo\\.test\\.js$' : '.*\\.test\\.js$', |
|||
collectCoverageFrom: [ |
|||
'components/**/*.{ts,tsx}', |
|||
'!components/*/style/index.tsx', |
|||
'!components/style/index.tsx', |
|||
'!components/*/locale/index.tsx', |
|||
], |
|||
transformIgnorePatterns, |
|||
snapshotSerializers: [ |
|||
'enzyme-to-json/serializer', |
|||
], |
|||
}; |
@ -0,0 +1,21 @@ |
|||
module.exports = { |
|||
setupFiles: [ |
|||
'./tests/setup.js', |
|||
], |
|||
moduleFileExtensions: [ |
|||
'ts', |
|||
'tsx', |
|||
'js', |
|||
'md', |
|||
], |
|||
transform: { |
|||
'\\.tsx?$': './node_modules/typescript-babel-jest', |
|||
'\\.js$': './node_modules/babel-jest', |
|||
'\\.md$': './node_modules/antd-demo-jest', |
|||
}, |
|||
testRegex: 'demo\\.test\\.js$', |
|||
testEnvironment: 'node', |
|||
snapshotSerializers: [ |
|||
'enzyme-to-json/serializer' |
|||
], |
|||
}; |
@ -1,19 +0,0 @@ |
|||
{ |
|||
"setupFiles": [ |
|||
"./tests/setup.js" |
|||
], |
|||
"moduleFileExtensions": [ |
|||
"ts", |
|||
"tsx", |
|||
"js", |
|||
"md" |
|||
], |
|||
"transform": { |
|||
"\\.tsx?$": "./node_modules/typescript-babel-jest", |
|||
"\\.js$": "./node_modules/babel-jest", |
|||
"\\.md$": "./node_modules/antd-demo-jest" |
|||
}, |
|||
"testRegex": "demo\\.test\\.js$", |
|||
"testEnvironment": "node", |
|||
"snapshotSerializers": ["enzyme-to-json/serializer"] |
|||
} |
Loading…
Reference in new issue