-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
32 lines (32 loc) · 917 Bytes
/
jest.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
module.exports = {
moduleNameMapper: {
'^~/(.*svg)(\\?inline)$': '<rootDir>/src/$1',
'^@/(.*)$': '<rootDir>/src/$1',
'^~/(.*)$': '<rootDir>/src/$1',
'^@@/(.*)$': '<rootDir>/$1',
'^vue$': 'vue/dist/vue.common.js'
},
moduleFileExtensions: [
'js',
'jsx',
'vue',
'json'
],
transform: {
'^.+\\.svg': '<rootDir>/test/_support/svgTransform.js',
'^.+\\.js$': 'babel-jest',
'.*\\.(vue)$': 'vue-jest',
'.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$': 'jest-transform-stub',
},
collectCoverage: false,
collectCoverageFrom: [
'<rootDir>/src/pages/**/*.vue',
'<rootDir>/src/layouts/**/*.vue',
'<rootDir>/src/components/**/*.vue',
'<rootDir>/src/services/**/*.js',
'<rootDir>/src/states/**/*.js',
'<rootDir>/src/utils/**/*.js',
],
setupFilesAfterEnv: ['<rootDir>/test/_support/jestSetup.js'],
testEnvironment: 'jsdom'
}