-
Notifications
You must be signed in to change notification settings - Fork 6
/
jest.config.js
41 lines (41 loc) · 1.41 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
40
41
module.exports = {
roots: ['<rootDir>/src'],
globals: {
PROJECT_VERSION: JSON.stringify(require('./package.json').version),
KEYCLOAK_HOST: 'localhost',
KEYCLOAK_REALM: 'SHOGun',
KEYCLOAK_CLIENT_ID: 'shogun-client'
},
transform: {
'^.+\\.jsx?$': 'babel-jest',
'^.+\\.tsx?$': 'babel-jest'
},
testMatch: ['<rootDir>/src/**/?(*.)(spec).(j|t)s?(x)'],
testPathIgnorePatterns: ['<rootDir>/src/e2e-tests/'],
collectCoverageFrom: [
'<rootDir>/src/**/*.{tsx,jsx,ts,js}',
'!<rootDir>/src/e2e-tests/**'
],
setupFilesAfterEnv: [
'<rootDir>/jest.setup.js',
'<rootDir>/jest/matchMediaMock.js',
'<rootDir>/jest/resizeObserverMock.js'
],
testEnvironment: './jest/CustomTestEnvironment.js',
transformIgnorePatterns: [
'<rootDir>/node_modules/(?!(ol|antd|@babel|jest-runtime|(rc-*[a-z]*)|@ant-design|@terrestris|query-string|decode-uri-component|split-on-first|filter-obj))'
],
moduleNameMapper: {
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'<rootDir>/jest/fileMock.js',
'^.+\\.(css|less)$': '<rootDir>/jest/cssTransform.js',
clientConfig: '<rootDir>/resources/config/gis-client-config.js'
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
reporters: [
'default',
'@casualbot/jest-sonar-reporter'
],
coverageReporters: ['json-summary', 'lcov', 'text'],
coverageDirectory: 'coverage/all'
};