-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
43 lines (43 loc) · 1.26 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
33
34
35
36
37
38
39
40
41
42
43
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
module.exports = {
roots: ['.'],
preset: 'ts-jest',
testEnvironment: 'jsdom',
transform: {
// process *.vue files with vue-jest
'.*\\.(vue)$': 'vue-jest',
// process TypeScript files
'^.+\\.(ts|tsx)$': 'ts-jest',
// process TypeScript files
'^.+\\.(js|jsx)$': 'babel-jest'
},
moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx', 'json', 'vue'],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
'\\.(css|less|scss|sass)$': 'identity-obj-proxy'
},
testMatch: null,
// serializer for snapshots
snapshotSerializers: [
'jest-serializer-vue'
],
collectCoverageFrom: [
'src/components/*.{js,vue,ts,tsx}',
'src/views/components/*.{js,vue,ts,tsx}',
'src/utils/*.{js,vue,ts,tsx}',
'!**/node_modules/**'
],
moduleDirectories: ['node_modules'],
testURL: 'http://localhost/',
testMatch: ['**/?(*.)(spec|test).(j|t)s?(x)'],
transformIgnorePatterns: [
'/node_modules/(?!vue-fullscreen)',
'/node_modules/(?!@ngrx|(?!deck.gl)|ng-dynamic)'
],
testPathIgnorePatterns: ['node_modules', '.history'],
setupFilesAfterEnv: ['<rootDir>/setupTests.js'],
watchPlugins: [
'jest-watch-typeahead/filename',
'jest-watch-typeahead/testname'
]
};