/* * For a detailed explanation regarding each configuration property and type check, visit: * https://jestjs.io/docs/en/configuration.html */ export default { collectCoverage: false, transform: { '^.+\\.ts$': 'ts-jest' }, moduleFileExtensions: ['js', 'ts'], testMatch: ['**/*.test.ts'], testPathIgnorePatterns: ['/node_modules/'], preset: 'ts-jest', globals: { 'ts-jest': { tsconfig: './tsconfig.json', diagnostics: false } }, moduleNameMapper: { // alias src/(.*) not work // 从上到下优先匹配 '@/test/(.*)': '/test/$1', '@/(.*)': '/src/$1' }, globalSetup: './test/config/setup.js', globalTeardown: './test/config/teardown.js', testEnvironment: './test/config/puppeteerEnvironment.js' }