mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-11 06:26:26 +00:00
31 lines
827 B
JavaScript
31 lines
827 B
JavaScript
const ci = !!process.env.CI;
|
|
|
|
module.exports = {
|
|
cacheDirectory: '.cache/jest',
|
|
coverageDirectory: './coverage',
|
|
collectCoverage: true,
|
|
collectCoverageFrom: [
|
|
'lib/**/*.{js,ts}',
|
|
'!lib/**/*.{d,spec}.ts',
|
|
'!lib/**/{__fixtures__,__mocks__,__testutil__}/**/*.{js,ts}',
|
|
],
|
|
coverageReporters: ci
|
|
? ['html', 'json', 'text-summary']
|
|
: ['html', 'text-summary'],
|
|
coverageThreshold: {
|
|
global: {
|
|
branches: 95,
|
|
functions: 100,
|
|
lines: 100,
|
|
statements: 100,
|
|
},
|
|
},
|
|
reporters: ['default', './tmp/tools/jest-gh-reporter.js'],
|
|
setupFilesAfterEnv: ['<rootDir>/test/globals.ts'],
|
|
snapshotSerializers: ['<rootDir>/test/newline-snapshot-serializer.ts'],
|
|
testEnvironment: 'node',
|
|
testRunner: 'jest-circus/runner',
|
|
transform: {
|
|
'^.+\\.(j|t)s$': 'babel-jest',
|
|
},
|
|
};
|