-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathjest-integration.config.js
33 lines (32 loc) · 1.07 KB
/
jest-integration.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
// Minor helper for test development. Allows for specific file testing.
const mainTestMatch = process.env.SPECIFIC_INTEGRATION_TEST_FILE
? `<rootDir>/__tests__/integration/**/${process.env.SPECIFIC_INTEGRATION_TEST_FILE}.test.ts`
: '<rootDir>/__tests__/integration/**/*.test.ts';
module.exports = {
testRunner: 'jest-circus/runner',
clearMocks: true,
coverageDirectory: 'coverage-integration',
testEnvironment: './CustomEnvironment.js',
collectCoverage: true,
collectCoverageFrom: ['<rootDir>/src/**/*.js', '<rootDir>/src/**/*.ts'],
testMatch: [mainTestMatch],
coverageReporters: ['text-summary', 'lcov', 'clover'],
testTimeout: 20 * 60 * 1000, // May be adjusted with optimizations
setupFilesAfterEnv: ['<rootDir>/setupTests-integration.js'],
maxConcurrency: 1,
coverageThreshold: {
global: {
statements: 42,
branches: 30,
functions: 40,
lines: 42,
},
// We need a high coverage for the HathorWallet class
'./src/new/wallet.js': {
statements: 92,
branches: 85,
functions: 90,
lines: 92,
},
},
};