2021-04-07 16:27:22 +03:00
|
|
|
module.exports = {
|
2021-05-26 18:27:32 +03:00
|
|
|
roots: ['<rootDir>/src'],
|
|
|
|
transform: {
|
|
|
|
'^.+\\.(ts|tsx|js|jsx)?$': 'ts-jest',
|
2021-07-08 11:17:34 +03:00
|
|
|
'^.+\\.svg$': 'jest-svg-transformer',
|
2021-05-26 18:27:32 +03:00
|
|
|
},
|
2021-06-21 09:46:29 +03:00
|
|
|
testRegex: '(/__tests__/.*)\\.(test|spec).[jt]sx?$',
|
2021-07-08 11:17:34 +03:00
|
|
|
setupFilesAfterEnv: ['<rootDir>/src/setupTests.ts'],
|
2021-05-26 18:27:32 +03:00
|
|
|
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
|
|
|
|
moduleDirectories: ['node_modules', 'src'],
|
|
|
|
testEnvironment: 'jsdom',
|
|
|
|
moduleNameMapper: {
|
|
|
|
'\\.(css|less|scss|sass)$': 'identity-obj-proxy',
|
|
|
|
},
|
|
|
|
globals: {
|
2021-06-10 10:19:30 +03:00
|
|
|
'ts-jest': {
|
2021-06-18 12:53:08 +03:00
|
|
|
tsconfig: 'tsconfig.test.json',
|
2021-06-10 10:19:30 +03:00
|
|
|
},
|
2021-05-26 18:27:32 +03:00
|
|
|
__DEV__: true,
|
|
|
|
CONSOLE_ASSET_VERSION: Date.now().toString(),
|
|
|
|
'process.hrtime': () => null,
|
|
|
|
__DEVELOPMENT__: true,
|
|
|
|
__CLIENT__: true,
|
|
|
|
__SERVER__: true,
|
|
|
|
__DISABLE_SSR__: true,
|
|
|
|
__DEVTOOLS__: true,
|
|
|
|
socket: true,
|
|
|
|
webpackIsomorphicTools: true,
|
|
|
|
window: {
|
|
|
|
__env: {
|
|
|
|
nodeEnv: 'development',
|
2021-04-07 16:27:22 +03:00
|
|
|
},
|
|
|
|
},
|
2021-05-26 18:27:32 +03:00
|
|
|
},
|
|
|
|
};
|