2020-05-20 19:47:49 +08:00
|
|
|
const { moduleNameMapper, transformIgnorePatterns } = require('./.jest');
|
|
|
|
|
|
|
|
// jest config for image snapshots
|
|
|
|
module.exports = {
|
|
|
|
setupFiles: ['./tests/setup.js'],
|
|
|
|
moduleFileExtensions: ['ts', 'tsx', 'js', 'md'],
|
|
|
|
moduleNameMapper,
|
|
|
|
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',
|
|
|
|
},
|
2020-10-23 18:50:46 +08:00
|
|
|
testRegex: 'image\\.test\\.(j|t)s$',
|
2020-05-20 19:47:49 +08:00
|
|
|
transformIgnorePatterns,
|
|
|
|
globals: {
|
|
|
|
'ts-jest': {
|
|
|
|
tsConfigFile: './tsconfig.test.json',
|
|
|
|
},
|
|
|
|
},
|
2020-11-13 19:35:46 +08:00
|
|
|
preset: 'jest-puppeteer',
|
2020-11-14 12:34:45 +08:00
|
|
|
testTimeout: 10000,
|
2020-05-20 19:47:49 +08:00
|
|
|
};
|