forked from testing-library/vue-testing-library
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
25 lines (24 loc) · 844 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
const merge = require('lodash.merge')
const config = require('kcd-scripts/jest')
module.exports = merge(config, {
testEnvironment: 'jsdom',
moduleFileExtensions: ['js', 'vue'],
coverageDirectory: './coverage',
collectCoverageFrom: ['**/src/**/*.js', '!**/src/__tests__/**'],
transform: {
'^.+\\.js$': '<rootDir>/node_modules/babel-jest',
'.*\\.(vue)$': '<rootDir>/node_modules/vue-jest',
},
snapshotSerializers: ['<rootDir>/node_modules/jest-serializer-vue'],
testPathIgnorePatterns: [
'<rootDir>/node_modules/',
'<rootDir>/src/__tests__/components',
'<rootDir>/src/__tests__/directives',
],
moduleNameMapper: {
'@vue/apollo-composable': [
'<rootDir>/node_modules/@vue/apollo-composable/dist/index.js',
],
},
transformIgnorePatterns: ['node_modules/(?!(@vue/apollo-composable)/)'],
})