renovate/jest.config.js

32 lines
827 B
JavaScript
Raw Normal View History

2020-02-28 08:25:14 +00:00
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}',
2020-02-28 08:25:14 +00:00
],
coverageReporters: ci
2020-02-28 11:19:18 +00:00
? ['html', 'json', 'text-summary']
: ['html', 'text-summary'],
2020-02-28 08:25:14 +00:00
coverageThreshold: {
global: {
2021-01-14 11:37:09 +00:00
branches: 96,
2020-02-28 08:25:14 +00:00
functions: 100,
lines: 100,
statements: 100,
},
},
reporters: ['default', './tmp/tools/jest-gh-reporter.js'],
2020-02-28 08:25:14 +00:00
setupFilesAfterEnv: ['<rootDir>/test/globals.ts'],
snapshotSerializers: ['<rootDir>/test/newline-snapshot-serializer.ts'],
2020-05-15 11:50:34 +00:00
testEnvironment: 'node',
testRunner: 'jest-circus/runner',
2020-02-28 08:25:14 +00:00
transform: {
'^.+\\.(j|t)s$': 'babel-jest',
},
};