-
Notifications
You must be signed in to change notification settings - Fork 38
/
jest.config.js
49 lines (49 loc) · 1.47 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
module.exports = {
testRegex: '/__tests__/.*[sS]pec\\.([jt]s)$',
testURL: 'http://localhost/',
transform: {
'^.+\\.(ts|tsx)$': 'typescript-babel-jest',
'^.+\\.twig$': '<rootDir>/testsetup/melody-transform.js',
'^.+\\.jsx?$': 'babel-jest',
},
moduleFileExtensions: ['ts', 'js', 'json'],
modulePaths: ['<rootDir>/packages'],
setupFiles: [
'<rootDir>/testsetup/requestAnimationFrame.js',
'<rootDir>/testsetup/document.createRange.js',
],
coverageReporters: ['json', 'lcov', 'text-summary', 'html'],
collectCoverageFrom: [
'packages/melody-hoc/**',
'packages/melody-runtime/**',
'packages/melody-code-frame/**',
'packages/melody-idom/**',
'packages/melody-compiler/**',
'packages/melody-component/**',
'packages/melody-loader/**',
'packages/melody-plugin-jsx/**',
'packages/melody-plugin-skip-if/**',
'packages/melody-plugin-load-functions/**',
'packages/melody-jest-transform/**',
'packages/melody-redux/**',
'packages/melody-util/**',
'!**/*.json',
],
coveragePathIgnorePatterns: [
'/node_modules/',
'/__tests__/',
'/__fixtures__/',
'/lib/',
'/build/',
'built/',
'/testsetup/',
],
coverageThreshold: {
global: {
statements: 89,
branches: 80,
functions: 91,
lines: 89,
},
},
};