1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20export default {
testEnvironment: 'jest-environment-jsdom',
transform: {
'^.+\\.vue$': '@vue/vue3-jest',
'^.+\\.[tj]sx?$': ['ts-jest', { tsconfig: './tsconfig.app.json' }]
},
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1'
},
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
testMatch: ['**/__tests__/**/*.spec.[jt]s?(x)', '**/?(*.)+(spec|test).[tj]s?(x)'],
testEnvironmentOptions: {
customExportConditions: ['node', 'node-addons'],
url: 'http://localhost/',
resources: 'usable',
runScripts: 'dangerously'
},
moduleFileExtensions: ['js', 'jsx', 'json', 'vue', 'ts', 'tsx']
}