-
-
Notifications
You must be signed in to change notification settings - Fork 35
/
jest.standalone.config.js
32 lines (32 loc) · 986 Bytes
/
jest.standalone.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
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: {
'\\.(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']
};