-
-
Notifications
You must be signed in to change notification settings - Fork 327
/
jest.config.js
38 lines (38 loc) · 1.19 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
/*
* @Author: zouyaoji@https://github.com/zouyaoji
* @Date: 2021-08-23 17:19:18
* @LastEditTime: 2022-02-09 17:00:11
* @LastEditors: zouyaoji
* @Description:
* @FilePath: \vue-cesium@next\jest.config.js
*/
module.exports = {
globals: {
// work around: https://github.com/kulshekhar/ts-jest/issues/748#issuecomment-423528659
'ts-jest': {
diagnostics: {
ignoreCodes: [151001]
}
}
},
runner: 'jest-electron/runner',
testEnvironment: 'jest-electron/environment',
transform: {
// Doesn't support jsx/tsx since sucrase doesn't support Vue JSX
'\\.(j|t)s$': '@sucrase/jest-plugin',
'^.+\\.vue$': 'vue-jest'
},
// moduleNameMapper: {
// '^lodash-es$': 'lodash'
// },
moduleFileExtensions: ['ts', 'tsx', 'js', 'json'],
// u can change this option to a more specific folder for test single component or util when dev
// for example, ['<rootDir>/packages/input']
roots: ['<rootDir>'],
testPathIgnorePatterns: ['/node_modules/', 'dist'],
modulePathIgnorePatterns: ['/node_modules/', 'dist'],
collectCoverage: true,
coverageDirectory: 'coverage',
coverageReporters: ['html', 'lcov', 'text'],
collectCoverageFrom: ['packages/*/src/**/*.ts']
}