-
Notifications
You must be signed in to change notification settings - Fork 3
/
jest.config.js
22 lines (22 loc) · 1007 Bytes
/
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
module.exports = {
moduleFileExtensions: ['ts', 'js'],
transform: {
'^.+\\.jsx?$': '<rootDir>/node_modules/babel-jest',
'^.+\\.tsx?$': '<rootDir>/node_modules/babel-jest'
},
testMatch: ['<rootDir>/src/**/?!(*.ui)(spec|test).(j|t)s?(x)'],
collectCoverageFrom: ['src/**/?!(*.ui)*.{tsx,jsx,ts,js}'],
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
testEnvironment: 'jest-environment-jsdom',
transformIgnorePatterns: [
'<rootDir>/node_modules/(?!(ol|antd|@babel|jest-runtime|(rc-*[a-z]*)|@ant-design|@terrestris|' +
'query-string|decode-uri-component|filter-obj|split-on-first|color-space|color-rgba|color-parse|shpjs|' +
'@camptocamp/inkmap|d3-selection|geostyler-openlayers-parser|geostyler-style))'
],
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'
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'json']
};