forked from LinusBorg/portal-vue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
30 lines (30 loc) · 934 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
30
module.exports = {
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'vue'],
transform: {
'^.+\\.jsx?$': 'babel-jest',
'^.+\\.tsx?$': 'ts-jest',
'^.+\\.vue$': 'vue-jest',
'.+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$':
'jest-transform-stub',
},
moduleNameMapper: {
'^vue$': 'vue/dist/vue.common',
'^@/(.*)$': '<rootDir>/src/$1',
},
setupFiles: ['<rootDir>/tests/unit/setup.js'],
snapshotSerializers: ['jest-serializer-vue'],
testMatch: [
'**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)',
],
testPathIgnorePatterns: ['<rootDir>/example', '<rootDir>/src/main.js'],
coveragePathIgnorePatterns: ['<rootDir>/example', '<rootDir>/src/main.js'],
watchPathIgnorePatterns: ['<rootDir>/example', '<rootDir>/src/main.js'],
globals: {
'ts-jest': {
babelConfig: true,
diagnostics: {
warnOnly: true,
},
},
},
}