-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
29 lines (29 loc) · 946 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>/ui/$1',
'^~/(.*)$': '<rootDir>/app/$1',
'^vue$': 'vue/dist/vue.common.js'
},
moduleFileExtensions: ['ts', 'js', 'vue', 'json', 'node'],
modulePathIgnorePatterns: ['node_modules', 'jest-test-results.json'],
transform: {
'^.+\\.(ts|tsx)$': 'ts-jest',
'^.+\\.(js|jsx)$': 'babel-jest',
'.*\\.(vue)$': '@vue/vue2-jest',
'.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$':
'jest-transform-stub'
},
testMatch: [
'<rootDir>/app/rest/**/*.(test|spec).@(js|ts)',
'<rootDir>/ui/test/**/*.(test|spec).@(js|ts)',
'<rootDir>/ui/components/**/*.(test|spec).@(js|ts)'
],
collectCoverage: false,
collectCoverageFrom: [
'<rootDir>/ui/components/**/*.vue',
'<rootDir>/ui/pages/**/*.vue',
'<rootDir>/app/rest/**/*.(test|spec).@(js|ts)'
],
testEnvironment: 'jsdom',
setupFiles: ['<rootDir>/ui/test/index.ts']
}