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],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
testEnvironment: 'jsdom',
|
|
|
|
transform: {
|
2020-07-27 16:17:41 +08:00
|
|
|
'^.+\\.vue$': 'vue-jest',
|
2020-09-21 15:39:53 +08:00
|
|
|
'^.+\\.(t|j)sx?$': [
|
|
|
|
'babel-jest', {
|
|
|
|
presets: [
|
|
|
|
[
|
|
|
|
'@babel/preset-env',
|
|
|
|
{
|
|
|
|
targets: {
|
|
|
|
node: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
'@babel/preset-typescript',
|
|
|
|
],
|
|
|
|
plugins: ['@vue/babel-plugin-jsx'],
|
|
|
|
},
|
|
|
|
],
|
2020-07-24 16:44:56 +08:00
|
|
|
},
|
2020-07-27 16:17:41 +08:00
|
|
|
moduleFileExtensions: ['vue', 'json', 'ts', 'tsx', 'js', 'json'],
|
2020-07-24 16:44:56 +08:00
|
|
|
}
|