-
-
Notifications
You must be signed in to change notification settings - Fork 38
/
jest.config.js
36 lines (36 loc) · 1.13 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
module.exports = {
testEnvironment: 'jsdom',
roots: ['<rootDir>/test'],
transform: {
'\\.tsx?$': [
'ts-jest',
{
tsconfig: {
outDir: './.ts-jest'
}
}
],
'\\.jsx?$': [
'babel-jest',
{
presets: ['@babel/preset-env'],
plugins: ['@babel/plugin-transform-modules-commonjs']
}
]
},
transformIgnorePatterns: [
'/node_modules/(?!(ol|txml|geotiff|quick-lru|color-|rbush|earcut|pbf|quickselect))'
],
moduleNameMapper: {
'^rlayers$': '<rootDir>/src',
'^rlayers/(.*)$': '<rootDir>/src/$1',
'\\.(css|less)$': '<rootDir>/test/css.js',
'^txml/txml$': '<rootDir>/node_modules/txml/dist/txml'
},
setupFiles: ['jest-canvas-mock'],
setupFilesAfterEnv: ['@testing-library/jest-dom', './test/setup_mocks.ts'],
testRegex: '/test/.*\\.test\\.tsx?$',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
collectCoverage: true,
coverageReporters: ['json', 'lcov', 'text', 'clover']
};