-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
36 lines (36 loc) · 1.08 KB
/
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
33
34
35
36
module.exports = {
collectCoverage: process.env.COVERAGE === 'true',
collectCoverageFrom: [
'**/*.{js,vue}',
'!**/node_modules/**',
'!**/lib/**',
'!**/tests/**',
'!**/build/**'
],
coverageReporters: ['html', 'text-summary'],
moduleFileExtensions: ['js', 'jsx', 'json', 'vue'],
setupFiles: ['<rootDir>tests/unit/setup'],
transform: {
'^.+\\.vue$': 'vue-jest',
'.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$':
'jest-transform-stub',
'^.+\\.js?$': 'babel-jest',
'^.+\\.jsx?$': 'babel-jest'
},
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/$1',
'^main/(.*)$': '<rootDir>/src/$1',
'^packages/(.*)$': '<rootDir>/packages/$1'
},
snapshotSerializers: ['jest-serializer-vue'],
testMatch: [
'**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.test.(js|jsx|ts|tsx)'
],
testPathIgnorePatterns: ['<rootDir>/.history/', '<rootDir>/node_modules/'],
testURL: 'http://localhost/',
transformIgnorePatterns: ['/node_modules/'],
watchPlugins: [
'jest-watch-typeahead/filename',
'jest-watch-typeahead/testname'
]
}