ant-design/.jest.node.js

19 lines
736 B
JavaScript
Raw Normal View History

const { moduleNameMapper, transformIgnorePatterns } = require('./.jest');
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'],
setupFilesAfterEnv: ['./tests/setupAfterEnv.ts'],
2018-12-17 16:10:58 +08:00
moduleFileExtensions: ['ts', 'tsx', 'js', 'md'],
moduleNameMapper,
2017-06-30 15:29:28 +08:00
transform: {
'\\.tsx?$': './node_modules/@ant-design/tools/lib/jest/codePreprocessor',
'\\.js$': './node_modules/@ant-design/tools/lib/jest/codePreprocessor',
'\\.md$': './node_modules/@ant-design/tools/lib/jest/demoPreprocessor',
'\\.(jpg|png|gif|svg)$': './node_modules/@ant-design/tools/lib/jest/imagePreprocessor',
2017-06-30 15:29:28 +08:00
},
testRegex: 'node\\.test\\.(j|t)sx$',
2017-06-30 15:29:28 +08:00
testEnvironment: 'node',
transformIgnorePatterns,
2017-06-30 15:29:28 +08:00
};