forked from webdriverio-community/wdio-electron-service
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
39 lines (39 loc) · 1.08 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
module.exports = {
preset: 'ts-jest/presets/default-esm',
coverageReporters: ['html', 'lcov', 'text'],
coverageDirectory: '<rootDir>/coverage',
testPathIgnorePatterns: ['<rootDir>/node_modules/'],
collectCoverage: true,
collectCoverageFrom: ['<rootDir>/src/*.ts'],
coverageThreshold: {
global: {
branches: 85,
functions: 85,
lines: 85,
statements: 85,
},
},
clearMocks: true,
extensionsToTreatAsEsm: ['.ts'],
rootDir: '.',
roots: ['<rootDir>'],
modulePaths: ['<rootDir>'],
modulePathIgnorePatterns: ['dist', '.node_modules_production'],
testMatch: ['<rootDir>/test/*.spec.ts'],
testEnvironment: 'jsdom',
testEnvironmentOptions: {
url: 'https://github.com/webdriverio-community/wdio-electron-service',
},
moduleNameMapper: {
'^uuid$': require.resolve('uuid'), // https://github.com/uuidjs/uuid/pull/616#issuecomment-1111006686
'^(\\.{1,2}/.*)\\.js$': '$1',
},
globals: {
'ts-jest': {
isolatedModules: true,
useESM: true,
tsconfig: './tsconfig.json',
packageJson: './package.json',
},
},
};