-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
jest.config.js
51 lines (51 loc) · 1.44 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
50
51
module.exports = {
preset: 'ts-jest',
globals: {
__DEV__: true,
__TEST__: true,
__VERSION__: require('./package.json').version,
__BROWSER__: false,
__GLOBAL__: false,
__ESM_BUNDLER__: true,
__ESM_BROWSER__: false,
__NODE_JS__: true,
__FEATURE_OPTIONS_API__: true,
__FEATURE_SUSPENSE__: true,
__FEATURE_PROD_DEVTOOLS__: false,
__COMPAT__: true,
'ts-jest': {
tsconfig: {
target: 'esnext',
sourceMap: true,
},
},
},
coverageDirectory: 'coverage',
coverageProvider: 'v8',
coverageReporters: ['html', 'lcov', 'text', 'json-summary'],
collectCoverageFrom: [
'packages/*/src/**/*.ts',
'!packages/shared/**',
'!packages/test-utils/**',
],
watchPathIgnorePatterns: [
'/node_modules/',
'/dist/',
'/.git/',
'/platforms/(android|ios)/app/',
],
moduleFileExtensions: ['ts', 'tsx', 'js', 'json'],
moduleNameMapper: {
'^@nativescript-vue/(.*?)$': '<rootDir>/packages/$1/src',
},
rootDir: __dirname,
testMatch: ['<rootDir>/packages/**/__tests__/**/*spec.[jt]s?(x)'],
testPathIgnorePatterns: process.env.SKIP_E2E
? // ignore example tests on netlify builds since they don't contribute
// to coverage and can cause netlify builds to fail
['/node_modules/', '/examples/__tests__']
: ['/node_modules/'],
setupFiles: ['<rootDir>/jest.setup.ts'],
setupFilesAfterEnv: ['<rootDir>/jest.setup.afterEnv.ts'],
// silent: true,
}