chore: update jest config (#4994)

This commit is contained in:
neverland
2019-11-13 15:36:12 +08:00
committed by GitHub
parent 9d21b53731
commit 4cd132c0ee
5 changed files with 5 additions and 47 deletions

View File

@@ -1,17 +1,12 @@
module.exports = {
preset: 'ts-jest',
setupFiles: ['<rootDir>/test/jest.init.js'],
moduleFileExtensions: ['js', 'vue', 'ts', 'tsx'],
moduleFileExtensions: ['js', 'jsx', 'vue', 'ts', 'tsx'],
transform: {
'^.+\\.(js|ts|tsx)$': '<rootDir>/test/jest.transform.js',
'.*\\.(vue)$': '<rootDir>/node_modules/vue-jest'
},
moduleNameMapper: {
'^src/(.*)$': '<rootDir>/src/$1'
'\\.(vue)$': 'vue-jest',
'\\.(js|jsx|ts|tsx)$': '<rootDir>/test/jest.transform.js',
},
snapshotSerializers: ['<rootDir>/node_modules/jest-serializer-vue'],
collectCoverageFrom: [
'src/**/*.{js,ts,tsx,vue}',
'src/**/*.{js,jsx,ts,tsx,vue}',
'!**/style/**',
'!**/demo/**',
'!**/locale/lang/**',