-
Notifications
You must be signed in to change notification settings - Fork 1
/
jest.config.js
29 lines (29 loc) · 966 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
module.exports = {
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/resources/$1',
'^~/(.*)$': '<rootDir>/resources/$1',
'^vue$': 'vue/dist/vue.common.js',
'^.+.(css|styl|less|sass|scss|png|jpg|svg|ttf|woff|woff2)$': 'jest-transform-stub'
},
moduleFileExtensions: ['js', 'vue', 'json', 'ts'],
transform: {
'.*\\.(ts)$': 'ts-jest',
'.*\\.(js)$': 'babel-jest',
'.*\\.(vue)$': 'vue-jest',
'.+\\.(css|styl|less|sass|scss|png|jpg|svg|ttf|woff|woff2)$': 'jest-transform-stub'
},
collectCoverage: true,
collectCoverageFrom: [
'<rootDir>/resources/components/**/*.vue',
'<rootDir>/resources/pages/**/*.vue',
'<rootDir>/resources/assets/js/**/*.js'
],
setupFilesAfterEnv: [
'<rootDir>/resources/test/jestSetup.js'
],
transformIgnorePatterns: [
'node_modules/(?!vue-router|@babel)'
],
snapshotSerializers: ['jest-serializer-vue-tjw'],
snapshotResolver: '<rootDir>/resources/test/snapshotResolver.js'
}