module.exports = { testEnvironment: 'jsdom', setupFilesAfterEnv: ['./jest.setup.js'], modulePaths: [ '' ], // tell Jest to handle `*.vue` files moduleFileExtensions: ['js', 'json', 'vue', 'ts'], watchman: false, moduleNameMapper: { '^~/(.*)$': '/$1', '^~~/(.*)$': '/$1', '^@/(.*)$': '/$1', '@shell/(.*)': '/shell/$1', '@pkg/(.*)': '/pkg/$1', '@components/(.*)': '/pkg/rancher-components/src/components/$1', }, transform: { '^.+\\.js$': '/node_modules/babel-jest', // process js with `babel-jest` '.*\\.(vue)$': '/node_modules/@vue/vue2-jest', // process `*.vue` files with `vue-jest` '^.+\\.tsx?$': 'ts-jest' // process `*.ts` files with `ts-jest` }, snapshotSerializers: ['/node_modules/jest-serializer-vue'], collectCoverage: false, collectCoverageFrom: [ '/shell/**/*.{vue,ts,js}', '/pkg/rancher-components/src/components/**/*.{vue,ts,js}', '!/shell/scripts/', ], modulePathIgnorePatterns: [ '/cypress/', '/scripts/', '/docusaurus/', '/stories/', '/shell/scripts/', ], coverageDirectory: '/coverage/unit', coverageReporters: ['json', 'text-summary'], globals: { 'ts-jest': { isolatedModules: true } }, preset: 'ts-jest' };