-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathjest.config.js
30 lines (30 loc) · 837 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 = {
preset: 'ts-jest',
globals: {
__DEV__: true,
__BROWSER__: true
},
coverageDirectory: 'coverage',
coverageReporters: ['html', 'lcov', 'text'],
collectCoverageFrom: [
'src/**/*.ts',
'!src/useApi.ts',
'!src/index.ts',
'!src/injectionSymbol.ts',
'!src/shims-vue.d.ts'
],
coveragePathIgnorePatterns: [
'/node_modules/',
'src/useApi.ts',
'src/global.d.ts',
'src/shims-vue.d.ts'
],
testMatch: ['<rootDir>/__tests__/**/*.spec.ts?(x)'],
watchPathIgnorePatterns: ['<rootDir>/node_modules'],
testEnvironment: 'jsdom',
transform: {
'^.+\\.vue$': '@vue/vue3-jest',
'^.+\\js$': 'babel-jest'
},
moduleFileExtensions: ['vue', 'js', 'json', 'jsx', 'ts', 'tsx', 'node']
}