-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
49 lines (48 loc) · 1.17 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
44
45
46
47
48
49
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { jsWithTs: tsjPreset } = require('ts-jest/presets')
const path = require('path')
module.exports = {
testEnvironment: 'node',
transform: {
...tsjPreset.transform
},
transformIgnorePatterns: [
'node_modules/(?!(lodash-es)/)'
],
testURL: 'http://localhost/',
collectCoverage: false,
coveragePathIgnorePatterns: [
'nerv.js',
'vue.js',
'utils.js'
],
moduleFileExtensions: [
'ts',
'tsx',
'js',
'jsx',
'json',
'node'
],
globals: {
ENABLE_INNER_HTML: true,
ENABLE_ADJACENT_HTML: true,
ENABLE_SIZE_APIS: true,
ENABLE_TEMPLATE_CONTENT: true,
ENABLE_CLONE_NODE: true,
'ts-jest': {
diagnostics: false,
tsConfig: 'tsconfig.test.json'
}
},
testPathIgnorePatterns: [
'node_modules',
'utils'
],
moduleNameMapper: {
'@tarojs/shared': path.resolve(__dirname, '..', '..', 'packages/shared/src/index.ts'),
'@tarojs/react': path.resolve(__dirname, '..', '..', 'packages/taro-react/dist/index.js')
},
// setupFiles: ['<rootDir>/__tests__/setup.js'],
testMatch: ['**/__tests__/?(*.)+(spec|test).[jt]s?(x)']
}