forked from ionic-team/stencil
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
62 lines (62 loc) · 2.46 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
52
53
54
55
56
57
58
59
60
61
62
module.exports = {
preset: './testing/jest-preset.js',
moduleNameMapper: {
'@app-data': '<rootDir>/internal/app-data/index.cjs',
'@app-globals': '<rootDir>/internal/app-globals/index.cjs',
'@compiler-deps': '<rootDir>/src/compiler/sys/modules/compiler-deps.ts',
'@platform': '<rootDir>/internal/testing/index.js',
'@runtime': '<rootDir>/internal/testing/index.js',
'@stencil/core/cli': '<rootDir>/cli/index.js',
'@stencil/core/compiler': '<rootDir>/compiler/stencil.js',
'@stencil/core/mock-doc': '<rootDir>/mock-doc/index.cjs',
'@stencil/core/testing': '<rootDir>/testing/index.js',
'@utils': '<rootDir>/src/utils',
},
coverageDirectory: './coverage/',
coverageReporters: ['json', 'lcov', 'text', 'clover'],
coveragePathIgnorePatterns: ['^.*\\.stub\\.tsx?$'],
collectCoverageFrom: [
'<rootDir>/scripts/**/*.{js,jsx,ts,tsx}',
'!<rootDir>/scripts/build/**/*.{js,jsx,ts,tsx}',
'!<rootDir>/scripts/bundles/helpers/compiler-cjs-intro.js',
'!<rootDir>/scripts/bundles/helpers/compiler-cjs-outro.js',
'<rootDir>/src/app-data/**/*.{js,jsx,ts,tsx}',
'<rootDir>/src/app-globals/**/*.{js,jsx,ts,tsx}',
'<rootDir>/src/cli/**/*.{js,jsx,ts,tsx}',
'<rootDir>/src/compiler/**/*.{js,jsx,ts,tsx}',
'<rootDir>/src/declarations/**/*.{js,jsx,ts,tsx}',
'<rootDir>/src/dev-server/**/*.{js,jsx,ts,tsx}',
'<rootDir>/src/hydrate/**/*.{js,jsx,ts,tsx}',
'<rootDir>/src/internal/**/*.{js,jsx,ts,tsx}',
'<rootDir>/src/mock-doc/**/*.{js,jsx,ts,tsx}',
'<rootDir>/src/runtime/**/*.{js,jsx,ts,tsx}',
'<rootDir>/src/screenshot/**/*.{js,jsx,ts,tsx}',
'<rootDir>/src/sys/node/**/*.{js,jsx,ts,tsx}',
'<rootDir>/src/testing/**/*.{js,jsx,ts,tsx}',
'<rootDir>/src/utils/**/*.{js,jsx,ts,tsx}',
],
modulePathIgnorePatterns: ['/bin', '/www'],
testPathIgnorePatterns: [
'<rootDir>/.cache/',
'<rootDir>/.github/',
'<rootDir>/.stencil/',
'<rootDir>/.vscode/',
'<rootDir>/bin/',
'<rootDir>/build/',
'<rootDir>/cli/',
'<rootDir>/compiler/',
'<rootDir>/dev-server/',
'<rootDir>/dist/',
'<rootDir>/internal/',
'<rootDir>/mock-doc/',
'<rootDir>/node_modules/',
'<rootDir>/screenshot/',
'<rootDir>/sys/',
'<rootDir>/test/',
'<rootDir>/testing/',
],
testRegex: '/(src|scripts)/.*\\.spec\\.(ts|tsx|js)$',
// TODO(STENCIL-307): Move away from Jasmine runner for internal Stencil tests, which involves re-working environment
// setup
testRunner: 'jest-jasmine2',
};