2017-11-01 17:47:20 +01:00
|
|
|
/* eslint comma-dangle: 0 */
|
|
|
|
|
|
|
|
module.exports = {
|
2022-01-09 20:51:50 +01:00
|
|
|
reporters: ['default', ['jest-junit', { outputDirectory: 'reports' }]],
|
2019-07-16 08:40:01 +02:00
|
|
|
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
|
2023-01-19 00:09:24 +01:00
|
|
|
testEnvironmentOptions: {
|
|
|
|
url: 'http://localhost',
|
|
|
|
},
|
2019-07-16 08:40:01 +02:00
|
|
|
testRegex: '(test/unit.*\\.spec)\\.ts',
|
|
|
|
// Some unit tests rely on data folders that look like packages. This confuses jest-hast-map
|
|
|
|
// when it tries to scan for package.json files.
|
|
|
|
transform: {
|
2022-01-09 20:51:50 +01:00
|
|
|
'^.+\\.(js|jsx|ts|tsx)$': 'babel-jest',
|
2019-07-16 08:40:01 +02:00
|
|
|
},
|
2018-02-19 19:29:14 +01:00
|
|
|
modulePathIgnorePatterns: [
|
2018-06-27 08:52:52 +02:00
|
|
|
'<rootDir>/test/unit/partials/mock-store/.*/package.json',
|
|
|
|
'<rootDir>/test/functional/store/.*/package.json',
|
|
|
|
'<rootDir>/test/unit/partials/store/.*/package.json',
|
|
|
|
'<rootDir>/coverage',
|
|
|
|
'<rootDir>/docs',
|
|
|
|
'<rootDir>/debug',
|
|
|
|
'<rootDir>/scripts',
|
|
|
|
'<rootDir>/.circleci',
|
|
|
|
'<rootDir>/tools',
|
|
|
|
'<rootDir>/wiki',
|
|
|
|
'<rootDir>/systemd',
|
|
|
|
'<rootDir>/flow-typed',
|
|
|
|
'<rootDir>test/unit/partials/mock-store/.*/package.json',
|
|
|
|
'<rootDir>/test/functional/store/.*/package.json',
|
|
|
|
'<rootDir>/build',
|
|
|
|
'<rootDir>/.vscode/',
|
2017-11-28 17:05:58 +01:00
|
|
|
],
|
2022-01-09 20:51:50 +01:00
|
|
|
testPathIgnorePatterns: ['__snapshots__', '<rootDir>/build'],
|
2023-01-18 22:49:28 +01:00
|
|
|
coveragePathIgnorePatterns: [
|
|
|
|
'node_modules',
|
|
|
|
'fixtures',
|
|
|
|
'<rootDir>/src/api/debug',
|
|
|
|
'<rootDir>/test',
|
|
|
|
],
|
2023-01-28 14:39:37 +01:00
|
|
|
collectCoverage: true,
|
|
|
|
coverageReporters: ['text-summary', 'lcov', 'html'],
|
|
|
|
coverageThreshold: {
|
|
|
|
global: {
|
|
|
|
lines: 75,
|
|
|
|
functions: 79,
|
|
|
|
branches: 64,
|
|
|
|
statements: 75,
|
|
|
|
},
|
|
|
|
},
|
2017-11-01 17:47:20 +01:00
|
|
|
};
|