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/(.*)': '/shell/pkg/$1', '@components/(.*)': '/pkg/rancher-components/src/components/$1', }, transform: { // process js with `babel-jest` '^.+\\.js$': '/node_modules/babel-jest', // process `*.vue` files with `vue-jest` '.*\\.(vue)$': '/node_modules/@vue/vue2-jest', // process `*.ts` files with `ts-jest` '^.+\\.tsx?$': 'ts-jest' }, snapshotSerializers: ['/node_modules/jest-serializer-vue'], collectCoverage: false, collectCoverageFrom: [ '/shell/components/**/*.vue', '/shell/utils/**/*', // '/pages/*.vue', // '!/components/RancherProviderIcon.vue', ], modulePathIgnorePatterns: ['/cypress/'], coverageDirectory: '/coverage', coverageReporters: ['html', 'text'], globals: { 'ts-jest': { isolatedModules: true } }, preset: 'ts-jest' };