2018-12-17 16:10:58 +08:00
|
|
|
// jest config for server render environment
|
2017-06-30 15:29:28 +08:00
|
|
|
module.exports = {
|
2018-12-16 11:26:36 +08:00
|
|
|
setupFiles: ['./tests/setup.js'],
|
2018-12-17 16:10:58 +08:00
|
|
|
moduleFileExtensions: ['ts', 'tsx', 'js', 'md'],
|
2017-06-30 15:29:28 +08:00
|
|
|
transform: {
|
2017-08-18 15:00:21 +08:00
|
|
|
'\\.tsx?$': './node_modules/antd-tools/lib/jest/codePreprocessor',
|
|
|
|
'\\.js$': './node_modules/antd-tools/lib/jest/codePreprocessor',
|
|
|
|
'\\.md$': './node_modules/antd-tools/lib/jest/demoPreprocessor',
|
2017-06-30 15:29:28 +08:00
|
|
|
},
|
2018-12-17 16:10:58 +08:00
|
|
|
testRegex: 'demo\\.test\\.js$',
|
2017-06-30 15:29:28 +08:00
|
|
|
testEnvironment: 'node',
|
2018-12-16 11:26:36 +08:00
|
|
|
snapshotSerializers: ['enzyme-to-json/serializer'],
|
2017-11-17 14:38:54 +08:00
|
|
|
globals: {
|
|
|
|
'ts-jest': {
|
2018-12-17 16:10:58 +08:00
|
|
|
tsConfigFile: './tsconfig.test.json',
|
2018-08-10 13:49:06 +08:00
|
|
|
},
|
2017-11-17 14:38:54 +08:00
|
|
|
},
|
2017-06-30 15:29:28 +08:00
|
|
|
};
|