-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
32 lines (32 loc) · 1 KB
/
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
module.exports = {
collectCoverageFrom: ['./**/*.{js,ts,tsx}', '!**/*.d.ts'],
globals: {
'ts-jest': {
babelConfig: true,
diagnostics: false,
tsConfig: '<rootDir>/tsconfig.build.json'
}
},
moduleDirectories: ['node_modules'],
moduleFileExtensions: ['ts', 'js', 'tsx'],
moduleNameMapper: {
'\\.(css|sass|scss)$': 'identity-obj-proxy',
'^@/(.*)$': '<rootDir>/$1',
'^@/test$': '<rootDir>/test/index.js',
'^@/test/(.*)$': '<rootDir>/test/$1'
},
roots: ['<rootDir>'],
// setupFilesAfterEnv: ['<rootDir>/test/index.ts'],
// snapshotSerializers: ['jest-serializer-html'],
// testEnvironment: 'jest-environment-jsdom-fourteen',
testMatch: ['./**/*.spec.(js|jsx|ts|tsx)'],
transform: {
// '.*\\.(j|t)s$': 'ts-jest',
// '.*\\.tsx$': 'ts-jest'
'\\.(ts|tsx)$': 'ts-jest'
// '\\.(sass|scss)$': 'jest-css-modules',
// '\\.(styl)$': 'jest-css-modules'
},
transformIgnorePatterns: ['node_modules/(?!vue-router)', 'dist', 'temp'],
verbose: false
};