2020-07-24 16:44:56 +08:00
|
|
|
module.exports = {
|
|
|
|
globals: {
|
|
|
|
// work around: https://github.com/kulshekhar/ts-jest/issues/748#issuecomment-423528659
|
|
|
|
'ts-jest': {
|
|
|
|
diagnostics: {
|
|
|
|
ignoreCodes: [151001],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2021-09-23 08:12:37 +08:00
|
|
|
testPathIgnorePatterns: ['/node_modules/', 'dist'],
|
2021-09-26 01:29:07 +08:00
|
|
|
modulePathIgnorePatterns: ['/node_modules/', 'dist'],
|
2020-07-24 16:44:56 +08:00
|
|
|
testEnvironment: 'jsdom',
|
|
|
|
transform: {
|
2021-09-27 15:25:58 +08:00
|
|
|
// Doesn't support jsx/tsx since sucrase doesn't support Vue JSX
|
|
|
|
'\\.(j|t)s$': '@sucrase/jest-plugin',
|
2020-07-27 16:17:41 +08:00
|
|
|
'^.+\\.vue$': 'vue-jest',
|
2020-07-24 16:44:56 +08:00
|
|
|
},
|
2020-10-27 16:52:43 +08:00
|
|
|
moduleFileExtensions: ['ts', 'tsx', 'js', 'json'],
|
2020-10-27 16:52:16 +08:00
|
|
|
// u can change this option to a more specific folder for test single component or util when dev
|
|
|
|
// for example, ['<rootDir>/packages/input']
|
|
|
|
roots: ['<rootDir>'],
|
2020-07-24 16:44:56 +08:00
|
|
|
}
|