forked from WANZARGEN/spaceone-design-system
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
39 lines (37 loc) · 982 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
31
32
33
34
35
36
37
38
39
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { resolve } = require('path');
module.exports = {
preset: 'ts-jest',
globals: {
'vue-jest': {
tsConfig: resolve('tsconfig.json'),
},
},
moduleFileExtensions: [
'js',
'ts',
'jsx',
'json',
'vue',
],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
'^vue$': 'vue/dist/vue.common.js',
},
modulePathIgnorePatterns: [
'<rootDir>/node_modules/',
'<rootDir>/build/',
'<rootDir>/dist/',
],
transform: {
'^.+\\.vue$': 'vue-jest',
'^.+\\.jsx?$': 'babel-jest',
'^.+\\.ts?$': 'babel-jest',
'^.+\\.tsx?$': 'babel-jest',
'^.+\\.js$': '<rootDir>/node_modules/babel-jest',
'.+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$': 'jest-transform-stub',
},
snapshotSerializers: [
'jest-serializer-vue',
],
};