forked from koel/core
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
39 lines (38 loc) · 1.03 KB
/
jest.config.js
File metadata and controls
39 lines (38 loc) · 1.03 KB
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
37
38
39
/**
* By default jest doesn't transform files in node_modules.
* List names of the libraries we want to whitelist here, e.g., those export ES6 modules.
*/
const forceTransformModules = [
'@phanan/vuebus'
]
module.exports = {
moduleFileExtensions: [
'ts',
'js',
'vue'
],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/js/$1'
},
transform: {
'^.+\\.[tj]s$': '<rootDir>/node_modules/ts-jest',
'.*\\.(vue)$': '<rootDir>/node_modules/vue-jest'
},
snapshotSerializers: [
'<rootDir>/node_modules/jest-serializer-vue'
],
testMatch: ['**/__tests__/**/*.spec.ts'],
transformIgnorePatterns: [
`node_modules/(?!(${forceTransformModules.join('|')})/)`
],
globals: {
KOEL_ENV: 'web',
NODE_ENV: 'test'
},
setupFilesAfterEnv: ['<rootDir>/js/__tests__/setup.ts'],
verbose: true,
collectCoverage: true,
coverageReporters: ['lcov', 'json', 'html'],
coverageDirectory: '<rootDir>/js/__tests__/__coverage__',
coveragePathIgnorePatterns: ['/node_modules/', '/__tests__/', '/stubs/', '/libs/']
}