-
Notifications
You must be signed in to change notification settings - Fork 58
/
jest.config.cjs
46 lines (46 loc) · 1.39 KB
/
jest.config.cjs
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
42
43
44
45
46
module.exports = {
moduleFileExtensions: [
'js',
'ts',
'tsx'
],
moduleDirectories: [
'node_modules'
],
moduleNameMapper: {
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/jest/__mocks__/fileMock.js',
'\\.(css|less)$': '<rootDir>/jest/__mocks__/styleMock.js'
// Uncomment the following line if you're working with a linked
// @terrestris/ol-util package (or any other package that requires ol
// itself).
// "^ol/(.*)": '<rootDir>/node_modules/ol/$1'
},
modulePathIgnorePatterns: [
'<rootDir>/build/',
'<rootDir>/dist/'
],
transformIgnorePatterns: [
'node_modules/(?!(ol|@camptocamp/inkmap|@terrestris/*[a-z]*-util|d3-selection|color-*[a-z]*)|(rc-*[a-z]*)|' +
'filter-obj|query-string|decode-uri-component|split-on-first|shpjs/|rbush|quickselect|geostyler-openlayers-parser|' +
'geostyler-style|geotiff|quick-lru)'
],
setupFiles: [
'<rootDir>/jest/__mocks__/matchMediaMock.js'
],
setupFilesAfterEnv: [
'<rootDir>/jest/setup.js'
],
transform: {
'^.+\\.jsx?$': '<rootDir>/node_modules/babel-jest',
'^.+\\.tsx?$': '<rootDir>/node_modules/babel-jest'
},
collectCoverageFrom: [
'src/**/*.{ts,tsx}',
'!src/**/*example*.*'
],
coverageDirectory: '<rootDir>/coverage',
testEnvironment: 'jsdom',
testEnvironmentOptions: {
url: 'http://localhost/'
}
};