const path = require('path')
require('dotenv').config({ path: path.resolve(__dirname, '.env') })

module.exports = {
    setupFiles: ['<rootDir>/jest.setup.js'],
    moduleNameMapper: {
      '^@vue2-client/(.*)$': '<rootDir>/src/$1',
      '^@/(.*)$': '<rootDir>/src/$1',
      '\\.(css|less)$': 'identity-obj-proxy',
    },
    moduleFileExtensions: ['js', 'json', 'jsx', 'ts', 'tsx', 'node', 'vue'],
    testEnvironment: 'jsdom',
    transform: {
      '^.+\\.js$': 'babel-jest',
      '^.+\\.vue$': 'vue-jest',
      '^.+\\.less$': 'jest-transform-stub',
    },
    transformIgnorePatterns: [
      '/node_modules/(?!ant-design-vue)',
    ]
    // 其他 Jest 配置项...
  }
