forked from webdriverio/webdriverio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
59 lines (58 loc) · 1.75 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
/**
* workaround for bug
* https://github.com/jsdom/jsdom/issues/2795
* https://github.com/jsdom/jsdom/issues/2961
*/
const SKIPPED_NODE_10_TESTS = process.version.startsWith('v10')
? [
'<rootDir>/packages/webdriverio/tests/commands/browser/newWindow.test.js',
'<rootDir>/packages/webdriverio/tests/commands/element/isFocused.test.js',
'<rootDir>/packages/webdriverio/tests/scripts/resq.test.js',
'<rootDir>/packages/webdriverio/tests/scripts/isFocused.test.js'
]
: []
module.exports = {
testMatch: [
'**/tests/**/*.test.(js|ts)'
],
transform: {
'^.+\\.(ts|js)$': 'ts-jest'
},
testPathIgnorePatterns: [
'<rootDir>/tests/',
'<rootDir>/node_modules/',
...SKIPPED_NODE_10_TESTS
],
collectCoverageFrom: [
'packages/**/src/**/*.js'
],
moduleNameMapper: {
'graceful-fs': '<rootDir>/tests/helpers/fs.js'
},
coverageDirectory: './coverage/',
collectCoverage: true,
coverageThreshold: {
global: {
branches: 95,
functions: 98,
lines: 99,
statements: 98
}
},
testEnvironment: 'node',
coveragePathIgnorePatterns: [
'node_modules/',
'packages/devtools/src/scripts',
'packages/devtools/src/commands',
'packages/webdriverio/src/scripts',
'packages/wdio-devtools-service/src/scripts',
'packages/webdriverio/build',
'packages/webdriver/build',
'packages/wdio-cucumber-framework/tests/fixtures',
'packages/wdio-logger/build',
'packages/wdio-webdriver-mock-service',
'packages/wdio-lambda-runner',
'packages/wdio-smoke-test-reporter',
'packages/wdio-smoke-test-service'
]
}