forked from JiHong88/suneditor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
54 lines (44 loc) · 1.27 KB
/
jest.config.js
File metadata and controls
54 lines (44 loc) · 1.27 KB
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
module.exports = {
// Test environment
testEnvironment: 'jsdom',
// Test file patterns
testMatch: ['<rootDir>/test/unit/**/*.spec.js', '<rootDir>/test/unit/**/*.integration.spec.js', '<rootDir>/test/integration/**/*.spec.js'],
// Setup files
setupFilesAfterEnv: ['<rootDir>/test/setup.js'],
moduleDirectories: ['node_modules', '<rootDir>'],
// Module resolution
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1'
},
// Transform files using Babel
transform: {
'^.+\\.js$': 'babel-jest'
},
// Ignore
coveragePathIgnorePatterns: ['<rootDir>/src/assets/icons/defaultIcons.js', '<rootDir>/src/langs/.*\\.js$'],
// Collect coverage information
collectCoverageFrom: ['src/**/*.js', '!src/assets/icons/defaultIcons.js', '!src/langs/*.js', '!src/plugins/index.js', '!src/events.js', '!src/typedef.js'],
// Coverage thresholds
coverageThreshold: {
global: {
statements: 62,
branches: 53,
functions: 75,
lines: 63
}
},
projects: [
{
displayName: 'unit',
testMatch: ['<rootDir>/test/unit/**/*.spec.js', '<rootDir>/test/unit/**/*.integration.spec.js'],
testEnvironment: 'jsdom'
},
{
displayName: 'integration',
testMatch: ['<rootDir>/test/integration/**/*.spec.js'],
testEnvironment: 'jsdom'
}
],
// Verbose output
verbose: true
};