/ jest_config / jest.config.json
jest.config.json
1 { 2 "rootDir": "../", 3 "transform": { 4 "^.+\\.tsx?$": "<rootDir>/node_modules/ts-jest/preprocessor.js" 5 }, 6 "testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$", 7 "moduleDirectories": ["node_modules", "common"], 8 "moduleFileExtensions": ["ts", "tsx", "js", "jsx", "json", "worker.ts"], 9 "moduleNameMapper": { 10 "shared/(.*)": "<rootDir>/shared/$1", 11 "\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": 12 "<rootDir>/jest_config/__mocks__/fileMock.ts", 13 "\\.(css|scss)$": "<rootDir>/jest_config/__mocks__/styleMock.ts", 14 "\\.worker.ts": "<rootDir>/jest_config/__mocks__/workerMock.js" 15 }, 16 "testPathIgnorePatterns": ["dist"], 17 "coveragePathIgnorePatterns": ["components", "containers", "vendor", "spec"], 18 "setupFiles": [ 19 "<rootDir>/jest_config/setupJest.js", 20 "<rootDir>/jest_config/__mocks__/localStorage.ts" 21 ], 22 "automock": false, 23 "snapshotSerializers": ["enzyme-to-json/serializer"], 24 "browser": true, 25 "collectCoverage": true 26 }