// Jest预设配置，供其他mini UI包复用
// 注意：这是一个TypeScript文件，需要通过ts-jest转换
const config = {
    preset: 'ts-jest',
    testEnvironment: 'jsdom',
    setupFilesAfterEnv: ['@d8d/mini-testing-utils/testing/setup-taro'],
    moduleNameMapper: {
        '^@/(.*)$': '<rootDir>/src/$1',
        '^~/(.*)$': '<rootDir>/tests/$1',
        '^@tarojs/taro$': '@d8d/mini-testing-utils/testing/taro-api-mock.ts',
        '\\.(css|less|scss|sass)$': '@d8d/mini-testing-utils/testing/style-mock.js',
        '\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '@d8d/mini-testing-utils/testing/file-mock.js'
    },
    testMatch: [
        '<rootDir>/tests/**/*.spec.{ts,tsx}',
        '<rootDir>/tests/**/*.test.{ts,tsx}'
    ],
    collectCoverageFrom: [
        'src/**/*.{ts,tsx}',
        '!src/**/*.d.ts',
        '!src/**/index.{ts,tsx}',
        '!src/**/*.stories.{ts,tsx}'
    ],
    coverageDirectory: 'coverage',
    coverageReporters: ['text', 'lcov', 'html'],
    testPathIgnorePatterns: [
        '/node_modules/',
        '/dist/',
        '/coverage/'
    ],
    transform: {
        '^.+\\.(ts|tsx)$': 'ts-jest',
        '^.+\\.(js|jsx)$': 'babel-jest'
    },
    transformIgnorePatterns: [
        '/node_modules/(?!(swiper|@tarojs)/)'
    ],
    moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json']
};
module.exports = config;
//# sourceMappingURL=jest-preset.js.map