-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathjest.config.js
More file actions
26 lines (26 loc) · 866 Bytes
/
jest.config.js
File metadata and controls
26 lines (26 loc) · 866 Bytes
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
module.exports = {
testRegex: '.*\\.spec\\.ts$',
moduleFileExtensions: ['js', 'ts', 'vue'],
modulePaths: ['<rootDir>/src', '<rootDir>/node_modules'],
transformIgnorePatterns: ['/node_modules/'],
transform: {
'^.+\\.(j|t)sx?$': 'ts-jest',
'^.+\\.(vue)$': 'vue3-jest',
},
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
},
snapshotSerializers: ['<rootDir>/node_modules/jest-serializer-vue'],
testURL: 'http://localhost/',
watchPlugins: [
'jest-watch-typeahead/filename',
'jest-watch-typeahead/testname',
],
coverageDirectory: 'coverage',
collectCoverageFrom: ['<rootDir>/src/**/*.{js,ts,vue}'],
coveragePathIgnorePatterns: ['^.+\\.d\\.ts$', 'src/runtimeEnv.ts'],
modulePathIgnorePatterns: ['<rootDir>/.yarn-cache/'],
cacheDirectory: '<rootDir>/tmp/cache/jest',
timers: 'fake',
testEnvironment: 'jsdom',
};