mirror of
https://github.com/ant-design/ant-design.git
synced 2026-02-09 02:49:18 +08:00
* feat: add semantic.md generation plugin for components * refactor: extract locales from SelectSemanticTemplate to component props * fix: remove unuse locales * feat: multipleProps add defaultValue * feat: update select snap * feat: update table snap * feat: tour add snap * feat: delete semantic-md plugin * feat: add sematic snap * refactor: replace hardcoded button clicks with configurable postRenderFn in semantic demo test * revert: locales * fix: maxTagCount responsive * fix: test maxTagCount set 1 * feat: add test:semantic script * fix: ci add collectCoverageFrom --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: thinkasany <480968828@qq.com>
31 lines
1.0 KiB
JavaScript
31 lines
1.0 KiB
JavaScript
const { moduleNameMapper, transformIgnorePatterns } = require('./.jest');
|
|
|
|
// jest config for semantic demo snapshots
|
|
// Semantic tests don't need to run in React 18, 19, lib, es, dist repeatedly
|
|
module.exports = {
|
|
verbose: true,
|
|
testEnvironment: 'jsdom',
|
|
setupFiles: ['./tests/setup.ts', 'jest-canvas-mock'],
|
|
setupFilesAfterEnv: ['./tests/setupAfterEnv.ts'],
|
|
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'md'],
|
|
modulePathIgnorePatterns: ['/_site/'],
|
|
moduleNameMapper,
|
|
testPathIgnorePatterns: ['/node_modules/'],
|
|
transform: {
|
|
'\\.tsx?$': './node_modules/@ant-design/tools/lib/jest/codePreprocessor',
|
|
'\\.(m?)js$': './node_modules/@ant-design/tools/lib/jest/codePreprocessor',
|
|
'\\.md$': './node_modules/@ant-design/tools/lib/jest/demoPreprocessor',
|
|
},
|
|
testRegex: 'demo-semantic\\.test\\.(j|t)sx?$',
|
|
transformIgnorePatterns,
|
|
globals: {
|
|
'ts-jest': {
|
|
tsConfig: './tsconfig.test.json',
|
|
},
|
|
},
|
|
testEnvironmentOptions: {
|
|
url: 'http://localhost',
|
|
},
|
|
testTimeout: 10000,
|
|
};
|