forked from DevExpress/DevExtreme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
42 lines (41 loc) · 1.38 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
// For a detailed explanation regarding each configuration property, visit:
// https://jestjs.io/docs/en/configuration.html
const path = require('path');
const resolve = require('resolve');
module.exports = {
'globals': {
'ts-jest': {
tsConfig: './testing/jest/tsconfig.json',
diagnostics: false, // set to true to enable type checking
}
},
collectCoverageFrom: [
'./js/renovation/**/*.p.js',
'./js/renovation/button.tsx',
'!./js/renovation/error-message.p.js',
'!./js/renovation/number-box.p.js',
'!./js/renovation/select-box.p.js',
],
coverageDirectory: './testing/jest/code_coverage',
coverageThreshold: {
'./js/renovation/**/*.p.js': {
functions: 0, // Should set code coverage to 100%
statements: 0, // (after start testing declarations)
lines: 0,
branches: 0
}
},
roots: ['<rootDir>/testing/jest'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
preset: 'ts-jest',
setupFiles: [
path.join(path.resolve('.'), './testing/jest/setup_enzyme.ts'),
],
testMatch: [
'<rootDir>/testing/jest/**/*.tests.[jt]s?(x)'
],
transform: {
'test_components.+\\.tsx$': path.resolve('./testing/jest/utils/declaration_transformer.js'),
'\\.(js|jsx|ts|tsx)$': resolve.sync('ts-jest')
}
};